Create productprices
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
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.
Your unique id for the element, ie. the id of the element in your database
Merchant data related to the entity
Empty Object
Id of the product that is linked to the element.
^-?[0-9]+$M: At least one price must be active
trueNet price in currency, i.e. 10.00
^-?[0-9]+(\.[0-9]+)?$Currency i.e. EUR | USD ...
Filter for availability, i.e. {language: [de]} or {shippingCountry: [de]}
"{}"Empty Object
Name of the price, not visible to customer, i.e. T-Shirt EUR
Old net price, to show price reductions, in currency, i.e. 15.00
^-?[0-9]+(\.[0-9]+)?$Tax profile of the price, as defined in tax jurisdiction, i.e default | reduced
Price valid from. M: At least one price must be in past or null
^d{4}-d{2}-d{2} d{2}:d{2}:d{2}$stringPrice valid to. M: at least one price must be valid
^d{4}-d{2}-d{2} d{2}:d{2}:d{2}$stringResponse 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"
}