Update order by orderReference
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
Path Parameters
Your orderReference (The Order ID in your system)
Optional, addresses of the invoice, if not provided they will be copied from the identity in the moment of creation.
Date after which the unattached amount of the order is accounted as overpayment
Main currency of the order
"Inherited from identity if omitted"Merchant information related to the entity, you can store any JSON here. Size limits according to your contract.
If true the calculations are rounded to 2 decimal places, this is the recommended option for B2B business.
If false (null) the calculations are rounded to 4 decimal places to achieve better gross amounts for end customers.
Date of the order
Kind of payment intended to be used for this order, can be different for subsequent invoices.
PP: Paypal
CC: Credit Card
DD: Direct Debit
CT: Cash Transfer
CD: Cash on Delivery
"PP" | "CC" | "DD" | "CT" | "CD"Your orderReference (A unique identifier in your system), if you don't send this Abillify will generate one.
Response Body
curl -X PUT "https://staging1.abillify.dev/api/orders/string" \
-H "Content-Type: application/json" \
-d '{
"cancelationdate": "2024-01-01T00:00:00.000Z",
"state": "canceled"
}'const body = JSON.stringify({
"cancelationdate": "2024-01-01T00:00:00.000Z",
"state": "canceled"
})
fetch("https://staging1.abillify.dev/api/orders/string", {
body
})package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://staging1.abillify.dev/api/orders/string"
body := strings.NewReader(`{
"cancelationdate": "2024-01-01T00:00:00.000Z",
"state": "canceled"
}`)
req, _ := http.NewRequest("PUT", url, body)
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/orders/string"
body = {
"cancelationdate": "2024-01-01T00:00:00.000Z",
"state": "canceled"
}
response = requests.request("PUT", url, json = body, headers = {
"Content-Type": "application/json"
})
print(response.text){
"addresses": [
{
"city": "Berlin",
"country": "DE",
"extra": "C/O Mr. Smith",
"housenumber": "1",
"info": "string",
"kind": "shipping",
"state": "Berlin",
"street": "Main Street",
"zipcode": "10115",
"company": "ACME Inc.",
"firstname": "John",
"lastname": "Doe"
}
],
"cancellationdate": "2020-01-01T00:00:00.000Z",
"created": "2020-01-01T00:00:00.000Z",
"currency": "EUR",
"detail": {
"locale": "de-DE",
"reverseCharge": true,
"vatId": "DE987654321"
},
"id": "5e4a7b2b-1b0b-4c7a-8f0a-5b9b6b7c8d9e",
"identity": "1",
"items": [
{
"account": "8400",
"costcenter": "8086",
"created": "2020-01-01T00:00:00.000Z",
"detail": {
"description": "This is a product description",
"taxprofile": "default",
"vatclause": "Umsatzsteuerbefreit gem. UstG. §4 Nr. 1a"
},
"groupingflag": "DE|1234",
"id": "5e4a7b2b-1b0b-4c7a-8f0a-5b9b6b7c8d9e",
"kind": "principal",
"label": "Couch Grey 3-Seater",
"modified": "2020-01-01T00:00:00.000Z",
"net": 991.6,
"pos": 1,
"product_number": "1234567890",
"quantity": 1,
"reference": "1234567890",
"servicebegin": "2020-01-01T00:00:00.000Z",
"serviceend": "2020-01-01T00:00:00.000Z",
"taxaccount": "1776",
"taxrate": 0.19,
"unit": "pieces",
"unitprice": 1190
}
],
"meta": {
"custom_key": "custom_value"
},
"modified": "2020-01-01T00:00:00.000Z",
"net": 1000,
"netbased": true,
"orderdate": "2020-01-01T00:00:00.000Z",
"ordernumber": "1234",
"paymentkind": "CT",
"reference": "123456789098765443",
"tax": 119,
"total": 1190
}{
"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"
}