API Documentation
API Endpoints/Products

Create productprices

POST
/productprices
AuthorizationBasic <token>

Basic authentication is a simple authentication scheme built into the HTTP protocol. To use it, send your HTTP requests with an Authorization header that contains the word Basic followed by a space and a base64-encoded string username:password.Example: Authorization: Basic ZGVtbzpwQDU1dzByZA==

In: header

Header Parameters

Idempotency-Key?string

Set this optional header to the same value for idempotent requests. If the request is repeated with the same idempotency key, the server will return the same response as for the first request. Our servers retain the idempotency key and their result for 24 hours after the initial request, if not defined otherwise in your Abillify contract.

reference?string

Your unique id for the element, ie. the id of the element in your database

meta?object

Merchant data related to the entity

Empty Object

productstring

Id of the product that is linked to the element.

Match^-?[0-9]+$
active?boolean

M: At least one price must be active

Defaulttrue
amountstring

Net price in currency, i.e. 10.00

Match^-?[0-9]+(\.[0-9]+)?$
currencystring

Currency i.e. EUR | USD ...

filter?object

Filter for availability, i.e. {language: [de]} or {shippingCountry: [de]}

Default"{}"

Empty Object

labelstring

Name of the price, not visible to customer, i.e. T-Shirt EUR

old_amount?string

Old net price, to show price reductions, in currency, i.e. 15.00

Match^-?[0-9]+(\.[0-9]+)?$
taxprofilestring

Tax profile of the price, as defined in tax jurisdiction, i.e default | reduced

validfrom?string

Price valid from. M: At least one price must be in past or null

Match^d{4}-d{2}-d{2} d{2}:d{2}:d{2}$
Formatstring
validto?string

Price valid to. M: at least one price must be valid

Match^d{4}-d{2}-d{2} d{2}:d{2}:d{2}$
Formatstring

Response Body

curl -X POST "https://staging1.abillify.dev/api/productprices" \
  -H "Idempotency-Key: string" \
  -H "Content-Type: application/json" \
  -d '{
    "product": "123456789",
    "amount": "12345.45",
    "currency": "abcdefg",
    "label": "abcdefg",
    "taxprofile": "abcdefg"
  }'
const body = JSON.stringify({
  "product": "123456789",
  "amount": "12345.45",
  "currency": "abcdefg",
  "label": "abcdefg",
  "taxprofile": "abcdefg"
})

fetch("https://staging1.abillify.dev/api/productprices", {
  headers: {
    "Idempotency-Key": "string"
  },
  body
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
  "strings"
)

func main() {
  url := "https://staging1.abillify.dev/api/productprices"
  body := strings.NewReader(`{
    "product": "123456789",
    "amount": "12345.45",
    "currency": "abcdefg",
    "label": "abcdefg",
    "taxprofile": "abcdefg"
  }`)
  req, _ := http.NewRequest("POST", url, body)
  req.Header.Add("Idempotency-Key", "string")
  req.Header.Add("Content-Type", "application/json")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://staging1.abillify.dev/api/productprices"
body = {
  "product": "123456789",
  "amount": "12345.45",
  "currency": "abcdefg",
  "label": "abcdefg",
  "taxprofile": "abcdefg"
}
response = requests.request("POST", url, json = body, headers = {
  "Idempotency-Key": "string",
  "Content-Type": "application/json"
})

print(response.text)
{
  "client": "123456789",
  "committed": "2022-07-29 17:23:47",
  "created": "2022-07-29 17:23:47",
  "id": "123456789",
  "modified": "2022-07-29 17:23:47",
  "reference": "abcdefg",
  "meta": {},
  "product": "123456789",
  "active": false,
  "amount": "12345.45",
  "currency": "abcdefg",
  "filter": "{}",
  "label": "abcdefg",
  "old_amount": "12345.45",
  "taxprofile": "abcdefg",
  "validfrom": "2022-07-29 17:23:47",
  "validto": "2022-07-29 17:23:47"
}
{
  "code": 400,
  "details": [
    {
      "error": "Value for field 'debtor' is of wrong type, expected bigint.",
      "fields": [
        "debtor"
      ],
      "hint": "Value must be a number or a string containing only a number."
    }
  ],
  "message": "InvalidValue, see error details",
  "name": "ClientError",
  "type": "ERR_INVALID_VALUE"
}
{
  "code": 400,
  "details": [
    {
      "error": "Value for field 'debtor' is of wrong type, expected bigint.",
      "fields": [
        "debtor"
      ],
      "hint": "Value must be a number or a string containing only a number."
    }
  ],
  "message": "InvalidValue, see error details",
  "name": "ClientError",
  "type": "ERR_INVALID_VALUE"
}