Chilkat Online Tools

unicodeC / easybill REST API / Cancel document

Back to Collection Items

#include <C_CkHttpW.h>
#include <C_CkHttpResponseW.h>
#include <C_CkStringBuilderW.h>
#include <C_CkJsonObjectW.h>
#include <C_CkDtObjW.h>

void ChilkatSample(void)
    {
    HCkHttpW http;
    BOOL success;
    HCkHttpResponseW resp;
    HCkStringBuilderW sbResponseBody;
    HCkJsonObjectW jResp;
    int respStatusCode;
    HCkDtObjW Date_from;
    HCkDtObjW Date_to;
    const wchar_t *strVal;
    const wchar_t *description;
    const wchar_t *document_note;
    int quantity;
    const wchar_t *quantity_str;
    const wchar_t *unit;
    const wchar_t *position;
    const wchar_t *single_price_net;
    const wchar_t *single_price_gross;
    int vat_percent;
    const wchar_t *position_id;
    const wchar_t *total_price_net;
    const wchar_t *total_price_gross;
    const wchar_t *total_vat;
    const wchar_t *serial_number_id;
    const wchar_t *serial_number;
    const wchar_t *booking_account;
    const wchar_t *export_cost_1;
    const wchar_t *export_cost_2;
    const wchar_t *cost_price_net;
    const wchar_t *cost_price_total;
    const wchar_t *cost_price_charge;
    const wchar_t *cost_price_charge_type;
    const wchar_t *itemType;
    const wchar_t *Salutation;
    const wchar_t *Personal;
    const wchar_t *Title;
    const wchar_t *First_name;
    const wchar_t *Last_name;
    const wchar_t *Suffix_1;
    const wchar_t *Suffix_2;
    const wchar_t *Company_name;
    const wchar_t *Street;
    const wchar_t *Zip_code;
    const wchar_t *City;
    const wchar_t *State;
    const wchar_t *Country;
    const wchar_t *label_addressSalutation;
    const wchar_t *label_addressPersonal;
    const wchar_t *label_addressTitle;
    const wchar_t *label_addressFirst_name;
    const wchar_t *label_addressLast_name;
    const wchar_t *label_addressSuffix_1;
    const wchar_t *label_addressSuffix_2;
    const wchar_t *label_addressCompany_name;
    const wchar_t *label_addressStreet;
    const wchar_t *label_addressZip_code;
    const wchar_t *label_addressCity;
    const wchar_t *label_addressState;
    const wchar_t *label_addressCountry;
    const wchar_t *amount;
    const wchar_t *amount_net;
    const wchar_t *bank_debit_form;
    const wchar_t *billing_country;
    int calc_vat_from;
    const wchar_t *cancel_id;
    const wchar_t *cash_allowance;
    const wchar_t *cash_allowance_days;
    const wchar_t *cash_allowance_text;
    const wchar_t *contact_id;
    const wchar_t *contact_label;
    const wchar_t *contact_text;
    const wchar_t *created_at;
    const wchar_t *v_currency;
    const wchar_t *customer_id;
    const wchar_t *customer_snapshotLast_name;
    const wchar_t *customer_snapshotCompany_name;
    int Acquire_options;
    const wchar_t *Bank_account;
    const wchar_t *Bank_account_owner;
    const wchar_t *Bank_bic;
    const wchar_t *Bank_code;
    const wchar_t *Bank_iban;
    const wchar_t *Bank_name;
    const wchar_t *Birth_date;
    const wchar_t *Cash_allowance;
    int Cash_allowance_days;
    const wchar_t *Cash_discount;
    const wchar_t *Cash_discount_type;
    const wchar_t *customer_snapshotCity;
    const wchar_t *customer_snapshotState;
    const wchar_t *customer_snapshotCountry;
    const wchar_t *Created_at;
    const wchar_t *Updated_at;
    const wchar_t *Delivery_title;
    const wchar_t *Delivery_city;
    const wchar_t *Delivery_state;
    const wchar_t *Delivery_company_name;
    const wchar_t *Delivery_country;
    const wchar_t *Delivery_first_name;
    const wchar_t *Delivery_last_name;
    const wchar_t *Delivery_personal;
    int Delivery_salutation;
    const wchar_t *Delivery_street;
    const wchar_t *Delivery_suffix_1;
    const wchar_t *Delivery_suffix_2;
    const wchar_t *Delivery_zip_code;
    const wchar_t *Display_name;
    const wchar_t *Fax;
    const wchar_t *customer_snapshotFirst_name;
    const wchar_t *Grace_period;
    const wchar_t *Due_in_days;
    const wchar_t *Group_id;
    const wchar_t *Id;
    const wchar_t *Info_1;
    const wchar_t *Info_2;
    const wchar_t *Internet;
    const wchar_t *Login_id;
    const wchar_t *Mobile;
    const wchar_t *Note;
    const wchar_t *v_Number;
    int Payment_options;
    BOOL customer_snapshotPersonal;
    const wchar_t *Phone_1;
    const wchar_t *Phone_2;
    const wchar_t *Postbox;
    const wchar_t *Postbox_city;
    const wchar_t *Postbox_state;
    const wchar_t *Postbox_country;
    const wchar_t *Postbox_zip_code;
    const wchar_t *Sale_price_level;
    int customer_snapshotSalutation;
    const wchar_t *Sepa_agreement;
    const wchar_t *Sepa_agreement_date;
    const wchar_t *Sepa_mandate_reference;
    const wchar_t *Since_date;
    const wchar_t *customer_snapshotStreet;
    const wchar_t *customer_snapshotSuffix_1;
    const wchar_t *customer_snapshotSuffix_2;
    const wchar_t *Tax_number;
    const wchar_t *Court;
    const wchar_t *Court_registry_number;
    const wchar_t *Tax_options;
    const wchar_t *customer_snapshotTitle;
    const wchar_t *Archived;
    const wchar_t *Vat_identifier;
    const wchar_t *customer_snapshotZip_code;
    const wchar_t *Document_pdf_type;
    const wchar_t *Buyer_reference;
    const wchar_t *Foreign_supplier_number;
    const wchar_t *discount;
    const wchar_t *discount_type;
    const wchar_t *document_date;
    const wchar_t *due_date;
    const wchar_t *edited_at;
    const wchar_t *external_id;
    const wchar_t *replica_url;
    const wchar_t *grace_period;
    const wchar_t *due_in_days;
    const wchar_t *id;
    BOOL is_acceptable_on_public_domain;
    BOOL is_archive;
    const wchar_t *is_draft;
    BOOL is_replica;
    BOOL is_oss;
    const wchar_t *last_postbox_id;
    const wchar_t *login_id;
    const wchar_t *v_number;
    const wchar_t *order_number;
    const wchar_t *buyer_reference;
    const wchar_t *paid_amount;
    const wchar_t *paid_at;
    const wchar_t *pdf_pages;
    const wchar_t *pdf_template;
    const wchar_t *project_id;
    const wchar_t *Next_date;
    const wchar_t *Frequency;
    const wchar_t *Frequency_special;
    int Interval;
    const wchar_t *End_date_or_count;
    const wchar_t *Status;
    BOOL As_draft;
    BOOL Is_notify;
    const wchar_t *Send_as;
    BOOL Is_sign;
    BOOL Is_paid;
    const wchar_t *Paid_date_option;
    BOOL Is_sepa;
    const wchar_t *Sepa_local_instrument;
    const wchar_t *Sepa_sequence_type;
    const wchar_t *Sepa_reference;
    const wchar_t *Sepa_remittance_information;
    const wchar_t *Target_type;
    const wchar_t *ref_id;
    const wchar_t *root_id;
    const wchar_t *v_Type;
    const wchar_t *Date;
    const wchar_t *Text;
    const wchar_t *shipping_country;
    const wchar_t *status;
    const wchar_t *text;
    const wchar_t *text_prefix;
    const wchar_t *text_tax;
    const wchar_t *title;
    const wchar_t *v_type;
    BOOL use_shipping_address;
    const wchar_t *vat_country;
    const wchar_t *vat_id;
    const wchar_t *fulfillment_country;
    const wchar_t *vat_option;
    int i;
    int count_i;

    // This example assumes the Chilkat API to have been previously unlocked.
    // See Global Unlock Sample for sample code.

    http = CkHttpW_Create();

    CkHttpW_SetRequestHeader(http,L"Authorization",L"{{apiKey}}");
    CkHttpW_SetRequestHeader(http,L"Accept",L"application/json");

    resp = CkHttpW_QuickRequest(http,L"POST",L"https://api.easybill.de/rest/v1/documents/:id/cancel?use_text_from_template=false");
    if (CkHttpW_getLastMethodSuccess(http) == FALSE) {
        wprintf(L"%s\n",CkHttpW_lastErrorText(http));
        CkHttpW_Dispose(http);
        return;
    }

    sbResponseBody = CkStringBuilderW_Create();
    CkHttpResponseW_GetBodySb(resp,sbResponseBody);

    jResp = CkJsonObjectW_Create();
    CkJsonObjectW_LoadSb(jResp,sbResponseBody);
    CkJsonObjectW_putEmitCompact(jResp,FALSE);

    wprintf(L"Response Body:\n");
    wprintf(L"%s\n",CkJsonObjectW_emit(jResp));

    respStatusCode = CkHttpResponseW_getStatusCode(resp);
    wprintf(L"Response Status Code = %d\n",respStatusCode);
    if (respStatusCode >= 400) {
        wprintf(L"Response Header:\n");
        wprintf(L"%s\n",CkHttpResponseW_header(resp));
        wprintf(L"Failed.\n");
        CkHttpResponseW_Dispose(resp);
        CkHttpW_Dispose(http);
        CkStringBuilderW_Dispose(sbResponseBody);
        CkJsonObjectW_Dispose(jResp);
        return;
    }

    CkHttpResponseW_Dispose(resp);

    // Sample JSON response:
    // (Sample code for parsing the JSON response is shown below)

    // {
    //   "address": {
    //     "salutation": "<integer>",
    //     "personal": "<boolean>",
    //     "title": "<string>",
    //     "first_name": "<string>",
    //     "last_name": "<string>",
    //     "suffix_1": "<string>",
    //     "suffix_2": "<string>",
    //     "company_name": "<string>",
    //     "street": "<string>",
    //     "zip_code": "<string>",
    //     "city": "<string>",
    //     "state": "<string>",
    //     "country": "<string>"
    //   },
    //   "attachment_ids": [
    //     "<integer>",
    //     "<integer>"
    //   ],
    //   "label_address": {
    //     "salutation": "<integer>",
    //     "personal": "<boolean>",
    //     "title": "<string>",
    //     "first_name": "<string>",
    //     "last_name": "<string>",
    //     "suffix_1": "<string>",
    //     "suffix_2": "<string>",
    //     "company_name": "<string>",
    //     "street": "<string>",
    //     "zip_code": "<string>",
    //     "city": "<string>",
    //     "state": "<string>",
    //     "country": "<string>"
    //   },
    //   "amount": "<integer>",
    //   "amount_net": "<integer>",
    //   "bank_debit_form": null,
    //   "billing_country": "<string>",
    //   "calc_vat_from": 0,
    //   "cancel_id": "<long>",
    //   "cash_allowance": null,
    //   "cash_allowance_days": null,
    //   "cash_allowance_text": null,
    //   "contact_id": null,
    //   "contact_label": "",
    //   "contact_text": "",
    //   "created_at": "<dateTime>",
    //   "currency": "EUR",
    //   "customer_id": null,
    //   "customer_snapshot": {
    //     "last_name": "<string>",
    //     "company_name": "<string>",
    //     "acquire_options": 2,
    //     "additional_groups_ids": [
    //       "<integer>",
    //       "<integer>"
    //     ],
    //     "bank_account": "<string>",
    //     "bank_account_owner": "<string>",
    //     "bank_bic": "<string>",
    //     "bank_code": "<string>",
    //     "bank_iban": "<string>",
    //     "bank_name": "<string>",
    //     "birth_date": "<date>",
    //     "cash_allowance": "<float>",
    //     "cash_allowance_days": 7,
    //     "cash_discount": "<float>",
    //     "cash_discount_type": "AMOUNT",
    //     "city": "<string>",
    //     "state": "<string>",
    //     "country": "<string>",
    //     "created_at": "<date>",
    //     "updated_at": "<string>",
    //     "delivery_title": "<string>",
    //     "delivery_city": "<string>",
    //     "delivery_state": "<string>",
    //     "delivery_company_name": "<string>",
    //     "delivery_country": "<string>",
    //     "delivery_first_name": "<string>",
    //     "delivery_last_name": "<string>",
    //     "delivery_personal": "<boolean>",
    //     "delivery_salutation": 0,
    //     "delivery_street": "<string>",
    //     "delivery_suffix_1": "<string>",
    //     "delivery_suffix_2": "<string>",
    //     "delivery_zip_code": "<string>",
    //     "display_name": "<string>",
    //     "emails": [
    //       "<string>",
    //       "<string>"
    //     ],
    //     "fax": "<string>",
    //     "first_name": "<string>",
    //     "grace_period": "<integer>",
    //     "due_in_days": "<integer>",
    //     "group_id": "<integer>",
    //     "id": "<long>",
    //     "info_1": "<string>",
    //     "info_2": "<string>",
    //     "internet": "<string>",
    //     "login_id": "<long>",
    //     "mobile": "<string>",
    //     "note": "<string>",
    //     "number": "<string>",
    //     "payment_options": 1,
    //     "personal": false,
    //     "phone_1": "<string>",
    //     "phone_2": "<string>",
    //     "postbox": "<string>",
    //     "postbox_city": "<string>",
    //     "postbox_state": "<string>",
    //     "postbox_country": "<string>",
    //     "postbox_zip_code": "<string>",
    //     "sale_price_level": "SALEPRICE6",
    //     "salutation": 0,
    //     "sepa_agreement": "BASIC",
    //     "sepa_agreement_date": "<date>",
    //     "sepa_mandate_reference": "<string>",
    //     "since_date": "<date>",
    //     "street": "<string>",
    //     "suffix_1": "<string>",
    //     "suffix_2": "<string>",
    //     "tax_number": "<string>",
    //     "court": "<string>",
    //     "court_registry_number": "<string>",
    //     "tax_options": "nStbIm",
    //     "title": "<string>",
    //     "archived": "<boolean>",
    //     "vat_identifier": "<string>",
    //     "zip_code": "<string>",
    //     "document_pdf_type": "default",
    //     "buyer_reference": "<string>",
    //     "foreign_supplier_number": "<string>"
    //   },
    //   "discount": null,
    //   "discount_type": null,
    //   "document_date": "<date>",
    //   "due_date": "<date>",
    //   "edited_at": "<dateTime>",
    //   "external_id": null,
    //   "replica_url": null,
    //   "grace_period": "<integer>",
    //   "due_in_days": "<integer>",
    //   "id": "<long>",
    //   "is_acceptable_on_public_domain": false,
    //   "is_archive": false,
    //   "is_draft": "<boolean>",
    //   "is_replica": false,
    //   "is_oss": false,
    //   "item_notes": [
    //     "<string>",
    //     "<string>"
    //   ],
    //   "items": [
    //     {
    //       "number": null,
    //       "description": null,
    //       "document_note": "<string>",
    //       "quantity": 1,
    //       "quantity_str": "<string>",
    //       "unit": null,
    //       "type": "POSITION",
    //       "position": "<integer>",
    //       "single_price_net": null,
    //       "single_price_gross": "<float>",
    //       "vat_percent": 0,
    //       "discount": null,
    //       "discount_type": null,
    //       "position_id": null,
    //       "total_price_net": "<float>",
    //       "total_price_gross": "<float>",
    //       "total_vat": "<float>",
    //       "serial_number_id": "<string>",
    //       "serial_number": "<string>",
    //       "booking_account": null,
    //       "export_cost_1": null,
    //       "export_cost_2": null,
    //       "cost_price_net": null,
    //       "cost_price_total": "<float>",
    //       "cost_price_charge": "<float>",
    //       "cost_price_charge_type": "PERCENT",
    //       "itemType": "UNDEFINED",
    //       "id": "<long>"
    //     },
    //     {
    //       "number": null,
    //       "description": null,
    //       "document_note": "<string>",
    //       "quantity": 1,
    //       "quantity_str": "<string>",
    //       "unit": null,
    //       "type": "POSITION",
    //       "position": "<integer>",
    //       "single_price_net": null,
    //       "single_price_gross": "<float>",
    //       "vat_percent": 0,
    //       "discount": null,
    //       "discount_type": null,
    //       "position_id": null,
    //       "total_price_net": "<float>",
    //       "total_price_gross": "<float>",
    //       "total_vat": "<float>",
    //       "serial_number_id": "<string>",
    //       "serial_number": "<string>",
    //       "booking_account": null,
    //       "export_cost_1": null,
    //       "export_cost_2": null,
    //       "cost_price_net": null,
    //       "cost_price_total": "<float>",
    //       "cost_price_charge": "<float>",
    //       "cost_price_charge_type": "PERCENT",
    //       "itemType": "UNDEFINED",
    //       "id": "<long>"
    //     }
    //   ],
    //   "last_postbox_id": "<long>",
    //   "login_id": "<long>",
    //   "number": null,
    //   "order_number": "",
    //   "buyer_reference": "",
    //   "paid_amount": "<integer>",
    //   "paid_at": "<date>",
    //   "pdf_pages": "<integer>",
    //   "pdf_template": "<string>",
    //   "project_id": null,
    //   "recurring_options": {
    //     "next_date": "<date>",
    //     "frequency": "MONTHLY",
    //     "frequency_special": null,
    //     "interval": 1,
    //     "end_date_or_count": null,
    //     "status": "WAITING",
    //     "as_draft": false,
    //     "is_notify": false,
    //     "send_as": null,
    //     "is_sign": false,
    //     "is_paid": false,
    //     "paid_date_option": "created_date",
    //     "is_sepa": false,
    //     "sepa_local_instrument": null,
    //     "sepa_sequence_type": null,
    //     "sepa_reference": null,
    //     "sepa_remittance_information": null,
    //     "target_type": "INVOICE"
    //   },
    //   "ref_id": null,
    //   "root_id": null,
    //   "service_date": {
    //     "type": "SERVICE",
    //     "date": "<date>",
    //     "date_from": "<date>",
    //     "date_to": "<date>",
    //     "text": null
    //   },
    //   "shipping_country": null,
    //   "status": null,
    //   "text": "<string>",
    //   "text_prefix": "<string>",
    //   "text_tax": null,
    //   "title": null,
    //   "type": "INVOICE",
    //   "use_shipping_address": false,
    //   "vat_country": null,
    //   "vat_id": "",
    //   "fulfillment_country": null,
    //   "vat_option": null,
    //   "file_format_config": [
    //     {
    //       "type": "xrechnung2_2_xml"
    //     },
    //     {
    //       "type": "xrechnung3_0_xml"
    //     }
    //   ]
    // }

    // Sample code for parsing the JSON response...
    // Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code

    // Chilkat functions returning "const char *" return a pointer to temporary internal memory owned and managed by Chilkat.

    Date_from = CkDtObjW_Create();
    Date_to = CkDtObjW_Create();

    Salutation = CkJsonObjectW_stringOf(jResp,L"address.salutation");
    Personal = CkJsonObjectW_stringOf(jResp,L"address.personal");
    Title = CkJsonObjectW_stringOf(jResp,L"address.title");
    First_name = CkJsonObjectW_stringOf(jResp,L"address.first_name");
    Last_name = CkJsonObjectW_stringOf(jResp,L"address.last_name");
    Suffix_1 = CkJsonObjectW_stringOf(jResp,L"address.suffix_1");
    Suffix_2 = CkJsonObjectW_stringOf(jResp,L"address.suffix_2");
    Company_name = CkJsonObjectW_stringOf(jResp,L"address.company_name");
    Street = CkJsonObjectW_stringOf(jResp,L"address.street");
    Zip_code = CkJsonObjectW_stringOf(jResp,L"address.zip_code");
    City = CkJsonObjectW_stringOf(jResp,L"address.city");
    State = CkJsonObjectW_stringOf(jResp,L"address.state");
    Country = CkJsonObjectW_stringOf(jResp,L"address.country");
    label_addressSalutation = CkJsonObjectW_stringOf(jResp,L"label_address.salutation");
    label_addressPersonal = CkJsonObjectW_stringOf(jResp,L"label_address.personal");
    label_addressTitle = CkJsonObjectW_stringOf(jResp,L"label_address.title");
    label_addressFirst_name = CkJsonObjectW_stringOf(jResp,L"label_address.first_name");
    label_addressLast_name = CkJsonObjectW_stringOf(jResp,L"label_address.last_name");
    label_addressSuffix_1 = CkJsonObjectW_stringOf(jResp,L"label_address.suffix_1");
    label_addressSuffix_2 = CkJsonObjectW_stringOf(jResp,L"label_address.suffix_2");
    label_addressCompany_name = CkJsonObjectW_stringOf(jResp,L"label_address.company_name");
    label_addressStreet = CkJsonObjectW_stringOf(jResp,L"label_address.street");
    label_addressZip_code = CkJsonObjectW_stringOf(jResp,L"label_address.zip_code");
    label_addressCity = CkJsonObjectW_stringOf(jResp,L"label_address.city");
    label_addressState = CkJsonObjectW_stringOf(jResp,L"label_address.state");
    label_addressCountry = CkJsonObjectW_stringOf(jResp,L"label_address.country");
    amount = CkJsonObjectW_stringOf(jResp,L"amount");
    amount_net = CkJsonObjectW_stringOf(jResp,L"amount_net");
    bank_debit_form = CkJsonObjectW_stringOf(jResp,L"bank_debit_form");
    billing_country = CkJsonObjectW_stringOf(jResp,L"billing_country");
    calc_vat_from = CkJsonObjectW_IntOf(jResp,L"calc_vat_from");
    cancel_id = CkJsonObjectW_stringOf(jResp,L"cancel_id");
    cash_allowance = CkJsonObjectW_stringOf(jResp,L"cash_allowance");
    cash_allowance_days = CkJsonObjectW_stringOf(jResp,L"cash_allowance_days");
    cash_allowance_text = CkJsonObjectW_stringOf(jResp,L"cash_allowance_text");
    contact_id = CkJsonObjectW_stringOf(jResp,L"contact_id");
    contact_label = CkJsonObjectW_stringOf(jResp,L"contact_label");
    contact_text = CkJsonObjectW_stringOf(jResp,L"contact_text");
    created_at = CkJsonObjectW_stringOf(jResp,L"created_at");
    v_currency = CkJsonObjectW_stringOf(jResp,L"currency");
    customer_id = CkJsonObjectW_stringOf(jResp,L"customer_id");
    customer_snapshotLast_name = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.last_name");
    customer_snapshotCompany_name = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.company_name");
    Acquire_options = CkJsonObjectW_IntOf(jResp,L"customer_snapshot.acquire_options");
    Bank_account = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.bank_account");
    Bank_account_owner = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.bank_account_owner");
    Bank_bic = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.bank_bic");
    Bank_code = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.bank_code");
    Bank_iban = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.bank_iban");
    Bank_name = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.bank_name");
    Birth_date = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.birth_date");
    Cash_allowance = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.cash_allowance");
    Cash_allowance_days = CkJsonObjectW_IntOf(jResp,L"customer_snapshot.cash_allowance_days");
    Cash_discount = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.cash_discount");
    Cash_discount_type = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.cash_discount_type");
    customer_snapshotCity = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.city");
    customer_snapshotState = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.state");
    customer_snapshotCountry = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.country");
    Created_at = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.created_at");
    Updated_at = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.updated_at");
    Delivery_title = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.delivery_title");
    Delivery_city = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.delivery_city");
    Delivery_state = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.delivery_state");
    Delivery_company_name = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.delivery_company_name");
    Delivery_country = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.delivery_country");
    Delivery_first_name = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.delivery_first_name");
    Delivery_last_name = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.delivery_last_name");
    Delivery_personal = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.delivery_personal");
    Delivery_salutation = CkJsonObjectW_IntOf(jResp,L"customer_snapshot.delivery_salutation");
    Delivery_street = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.delivery_street");
    Delivery_suffix_1 = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.delivery_suffix_1");
    Delivery_suffix_2 = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.delivery_suffix_2");
    Delivery_zip_code = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.delivery_zip_code");
    Display_name = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.display_name");
    Fax = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.fax");
    customer_snapshotFirst_name = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.first_name");
    Grace_period = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.grace_period");
    Due_in_days = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.due_in_days");
    Group_id = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.group_id");
    Id = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.id");
    Info_1 = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.info_1");
    Info_2 = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.info_2");
    Internet = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.internet");
    Login_id = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.login_id");
    Mobile = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.mobile");
    Note = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.note");
    v_Number = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.number");
    Payment_options = CkJsonObjectW_IntOf(jResp,L"customer_snapshot.payment_options");
    customer_snapshotPersonal = CkJsonObjectW_BoolOf(jResp,L"customer_snapshot.personal");
    Phone_1 = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.phone_1");
    Phone_2 = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.phone_2");
    Postbox = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.postbox");
    Postbox_city = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.postbox_city");
    Postbox_state = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.postbox_state");
    Postbox_country = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.postbox_country");
    Postbox_zip_code = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.postbox_zip_code");
    Sale_price_level = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.sale_price_level");
    customer_snapshotSalutation = CkJsonObjectW_IntOf(jResp,L"customer_snapshot.salutation");
    Sepa_agreement = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.sepa_agreement");
    Sepa_agreement_date = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.sepa_agreement_date");
    Sepa_mandate_reference = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.sepa_mandate_reference");
    Since_date = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.since_date");
    customer_snapshotStreet = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.street");
    customer_snapshotSuffix_1 = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.suffix_1");
    customer_snapshotSuffix_2 = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.suffix_2");
    Tax_number = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.tax_number");
    Court = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.court");
    Court_registry_number = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.court_registry_number");
    Tax_options = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.tax_options");
    customer_snapshotTitle = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.title");
    Archived = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.archived");
    Vat_identifier = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.vat_identifier");
    customer_snapshotZip_code = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.zip_code");
    Document_pdf_type = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.document_pdf_type");
    Buyer_reference = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.buyer_reference");
    Foreign_supplier_number = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.foreign_supplier_number");
    discount = CkJsonObjectW_stringOf(jResp,L"discount");
    discount_type = CkJsonObjectW_stringOf(jResp,L"discount_type");
    document_date = CkJsonObjectW_stringOf(jResp,L"document_date");
    due_date = CkJsonObjectW_stringOf(jResp,L"due_date");
    edited_at = CkJsonObjectW_stringOf(jResp,L"edited_at");
    external_id = CkJsonObjectW_stringOf(jResp,L"external_id");
    replica_url = CkJsonObjectW_stringOf(jResp,L"replica_url");
    grace_period = CkJsonObjectW_stringOf(jResp,L"grace_period");
    due_in_days = CkJsonObjectW_stringOf(jResp,L"due_in_days");
    id = CkJsonObjectW_stringOf(jResp,L"id");
    is_acceptable_on_public_domain = CkJsonObjectW_BoolOf(jResp,L"is_acceptable_on_public_domain");
    is_archive = CkJsonObjectW_BoolOf(jResp,L"is_archive");
    is_draft = CkJsonObjectW_stringOf(jResp,L"is_draft");
    is_replica = CkJsonObjectW_BoolOf(jResp,L"is_replica");
    is_oss = CkJsonObjectW_BoolOf(jResp,L"is_oss");
    last_postbox_id = CkJsonObjectW_stringOf(jResp,L"last_postbox_id");
    login_id = CkJsonObjectW_stringOf(jResp,L"login_id");
    v_number = CkJsonObjectW_stringOf(jResp,L"number");
    order_number = CkJsonObjectW_stringOf(jResp,L"order_number");
    buyer_reference = CkJsonObjectW_stringOf(jResp,L"buyer_reference");
    paid_amount = CkJsonObjectW_stringOf(jResp,L"paid_amount");
    paid_at = CkJsonObjectW_stringOf(jResp,L"paid_at");
    pdf_pages = CkJsonObjectW_stringOf(jResp,L"pdf_pages");
    pdf_template = CkJsonObjectW_stringOf(jResp,L"pdf_template");
    project_id = CkJsonObjectW_stringOf(jResp,L"project_id");
    Next_date = CkJsonObjectW_stringOf(jResp,L"recurring_options.next_date");
    Frequency = CkJsonObjectW_stringOf(jResp,L"recurring_options.frequency");
    Frequency_special = CkJsonObjectW_stringOf(jResp,L"recurring_options.frequency_special");
    Interval = CkJsonObjectW_IntOf(jResp,L"recurring_options.interval");
    End_date_or_count = CkJsonObjectW_stringOf(jResp,L"recurring_options.end_date_or_count");
    Status = CkJsonObjectW_stringOf(jResp,L"recurring_options.status");
    As_draft = CkJsonObjectW_BoolOf(jResp,L"recurring_options.as_draft");
    Is_notify = CkJsonObjectW_BoolOf(jResp,L"recurring_options.is_notify");
    Send_as = CkJsonObjectW_stringOf(jResp,L"recurring_options.send_as");
    Is_sign = CkJsonObjectW_BoolOf(jResp,L"recurring_options.is_sign");
    Is_paid = CkJsonObjectW_BoolOf(jResp,L"recurring_options.is_paid");
    Paid_date_option = CkJsonObjectW_stringOf(jResp,L"recurring_options.paid_date_option");
    Is_sepa = CkJsonObjectW_BoolOf(jResp,L"recurring_options.is_sepa");
    Sepa_local_instrument = CkJsonObjectW_stringOf(jResp,L"recurring_options.sepa_local_instrument");
    Sepa_sequence_type = CkJsonObjectW_stringOf(jResp,L"recurring_options.sepa_sequence_type");
    Sepa_reference = CkJsonObjectW_stringOf(jResp,L"recurring_options.sepa_reference");
    Sepa_remittance_information = CkJsonObjectW_stringOf(jResp,L"recurring_options.sepa_remittance_information");
    Target_type = CkJsonObjectW_stringOf(jResp,L"recurring_options.target_type");
    ref_id = CkJsonObjectW_stringOf(jResp,L"ref_id");
    root_id = CkJsonObjectW_stringOf(jResp,L"root_id");
    v_Type = CkJsonObjectW_stringOf(jResp,L"service_date.type");
    Date = CkJsonObjectW_stringOf(jResp,L"service_date.date");
    CkJsonObjectW_DtOf(jResp,L"service_date.date_from",FALSE,Date_from);
    CkJsonObjectW_DtOf(jResp,L"service_date.date_to",FALSE,Date_to);
    Text = CkJsonObjectW_stringOf(jResp,L"service_date.text");
    shipping_country = CkJsonObjectW_stringOf(jResp,L"shipping_country");
    status = CkJsonObjectW_stringOf(jResp,L"status");
    text = CkJsonObjectW_stringOf(jResp,L"text");
    text_prefix = CkJsonObjectW_stringOf(jResp,L"text_prefix");
    text_tax = CkJsonObjectW_stringOf(jResp,L"text_tax");
    title = CkJsonObjectW_stringOf(jResp,L"title");
    v_type = CkJsonObjectW_stringOf(jResp,L"type");
    use_shipping_address = CkJsonObjectW_BoolOf(jResp,L"use_shipping_address");
    vat_country = CkJsonObjectW_stringOf(jResp,L"vat_country");
    vat_id = CkJsonObjectW_stringOf(jResp,L"vat_id");
    fulfillment_country = CkJsonObjectW_stringOf(jResp,L"fulfillment_country");
    vat_option = CkJsonObjectW_stringOf(jResp,L"vat_option");
    i = 0;
    count_i = CkJsonObjectW_SizeOfArray(jResp,L"attachment_ids");
    while (i < count_i) {
        CkJsonObjectW_putI(jResp,i);
        strVal = CkJsonObjectW_stringOf(jResp,L"attachment_ids[i]");
        i = i + 1;
    }

    i = 0;
    count_i = CkJsonObjectW_SizeOfArray(jResp,L"customer_snapshot.additional_groups_ids");
    while (i < count_i) {
        CkJsonObjectW_putI(jResp,i);
        strVal = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.additional_groups_ids[i]");
        i = i + 1;
    }

    i = 0;
    count_i = CkJsonObjectW_SizeOfArray(jResp,L"customer_snapshot.emails");
    while (i < count_i) {
        CkJsonObjectW_putI(jResp,i);
        strVal = CkJsonObjectW_stringOf(jResp,L"customer_snapshot.emails[i]");
        i = i + 1;
    }

    i = 0;
    count_i = CkJsonObjectW_SizeOfArray(jResp,L"item_notes");
    while (i < count_i) {
        CkJsonObjectW_putI(jResp,i);
        strVal = CkJsonObjectW_stringOf(jResp,L"item_notes[i]");
        i = i + 1;
    }

    i = 0;
    count_i = CkJsonObjectW_SizeOfArray(jResp,L"items");
    while (i < count_i) {
        CkJsonObjectW_putI(jResp,i);
        v_number = CkJsonObjectW_stringOf(jResp,L"items[i].number");
        description = CkJsonObjectW_stringOf(jResp,L"items[i].description");
        document_note = CkJsonObjectW_stringOf(jResp,L"items[i].document_note");
        quantity = CkJsonObjectW_IntOf(jResp,L"items[i].quantity");
        quantity_str = CkJsonObjectW_stringOf(jResp,L"items[i].quantity_str");
        unit = CkJsonObjectW_stringOf(jResp,L"items[i].unit");
        v_type = CkJsonObjectW_stringOf(jResp,L"items[i].type");
        position = CkJsonObjectW_stringOf(jResp,L"items[i].position");
        single_price_net = CkJsonObjectW_stringOf(jResp,L"items[i].single_price_net");
        single_price_gross = CkJsonObjectW_stringOf(jResp,L"items[i].single_price_gross");
        vat_percent = CkJsonObjectW_IntOf(jResp,L"items[i].vat_percent");
        discount = CkJsonObjectW_stringOf(jResp,L"items[i].discount");
        discount_type = CkJsonObjectW_stringOf(jResp,L"items[i].discount_type");
        position_id = CkJsonObjectW_stringOf(jResp,L"items[i].position_id");
        total_price_net = CkJsonObjectW_stringOf(jResp,L"items[i].total_price_net");
        total_price_gross = CkJsonObjectW_stringOf(jResp,L"items[i].total_price_gross");
        total_vat = CkJsonObjectW_stringOf(jResp,L"items[i].total_vat");
        serial_number_id = CkJsonObjectW_stringOf(jResp,L"items[i].serial_number_id");
        serial_number = CkJsonObjectW_stringOf(jResp,L"items[i].serial_number");
        booking_account = CkJsonObjectW_stringOf(jResp,L"items[i].booking_account");
        export_cost_1 = CkJsonObjectW_stringOf(jResp,L"items[i].export_cost_1");
        export_cost_2 = CkJsonObjectW_stringOf(jResp,L"items[i].export_cost_2");
        cost_price_net = CkJsonObjectW_stringOf(jResp,L"items[i].cost_price_net");
        cost_price_total = CkJsonObjectW_stringOf(jResp,L"items[i].cost_price_total");
        cost_price_charge = CkJsonObjectW_stringOf(jResp,L"items[i].cost_price_charge");
        cost_price_charge_type = CkJsonObjectW_stringOf(jResp,L"items[i].cost_price_charge_type");
        itemType = CkJsonObjectW_stringOf(jResp,L"items[i].itemType");
        id = CkJsonObjectW_stringOf(jResp,L"items[i].id");
        i = i + 1;
    }

    i = 0;
    count_i = CkJsonObjectW_SizeOfArray(jResp,L"file_format_config");
    while (i < count_i) {
        CkJsonObjectW_putI(jResp,i);
        v_type = CkJsonObjectW_stringOf(jResp,L"file_format_config[i].type");
        i = i + 1;
    }



    CkHttpW_Dispose(http);
    CkStringBuilderW_Dispose(sbResponseBody);
    CkJsonObjectW_Dispose(jResp);
    CkDtObjW_Dispose(Date_from);
    CkDtObjW_Dispose(Date_to);

    }

Curl Command

curl -X POST
	-H "Authorization: {{apiKey}}"
	-H "Accept: application/json"
https://api.easybill.de/rest/v1/documents/:id/cancel?use_text_from_template=false

Postman Collection Item JSON

{
  "name": "Cancel document",
  "request": {
    "method": "POST",
    "header": [
      {
        "key": "Accept",
        "value": "application/json"
      }
    ],
    "url": {
      "raw": "{{baseUrl}}/documents/:id/cancel?use_text_from_template=false",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "documents",
        ":id",
        "cancel"
      ],
      "query": [
        {
          "key": "use_text_from_template",
          "value": "false",
          "description": "Use standard texts from the template."
        }
      ],
      "variable": [
        {
          "key": "id",
          "value": "<long>",
          "description": "(Required) ID of document"
        }
      ]
    }
  },
  "response": [
    {
      "name": "Successful operation",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "Authorization",
            "value": "<API Key>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/documents/:id/cancel?use_text_from_template=false",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "documents",
            ":id",
            "cancel"
          ],
          "query": [
            {
              "key": "use_text_from_template",
              "value": "false",
              "description": "Use standard texts from the template."
            }
          ],
          "variable": [
            {
              "key": "id"
            }
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"address\": {\n    \"salutation\": \"<integer>\",\n    \"personal\": \"<boolean>\",\n    \"title\": \"<string>\",\n    \"first_name\": \"<string>\",\n    \"last_name\": \"<string>\",\n    \"suffix_1\": \"<string>\",\n    \"suffix_2\": \"<string>\",\n    \"company_name\": \"<string>\",\n    \"street\": \"<string>\",\n    \"zip_code\": \"<string>\",\n    \"city\": \"<string>\",\n    \"state\": \"<string>\",\n    \"country\": \"<string>\"\n  },\n  \"attachment_ids\": [\n    \"<integer>\",\n    \"<integer>\"\n  ],\n  \"label_address\": {\n    \"salutation\": \"<integer>\",\n    \"personal\": \"<boolean>\",\n    \"title\": \"<string>\",\n    \"first_name\": \"<string>\",\n    \"last_name\": \"<string>\",\n    \"suffix_1\": \"<string>\",\n    \"suffix_2\": \"<string>\",\n    \"company_name\": \"<string>\",\n    \"street\": \"<string>\",\n    \"zip_code\": \"<string>\",\n    \"city\": \"<string>\",\n    \"state\": \"<string>\",\n    \"country\": \"<string>\"\n  },\n  \"amount\": \"<integer>\",\n  \"amount_net\": \"<integer>\",\n  \"bank_debit_form\": null,\n  \"billing_country\": \"<string>\",\n  \"calc_vat_from\": 0,\n  \"cancel_id\": \"<long>\",\n  \"cash_allowance\": null,\n  \"cash_allowance_days\": null,\n  \"cash_allowance_text\": null,\n  \"contact_id\": null,\n  \"contact_label\": \"\",\n  \"contact_text\": \"\",\n  \"created_at\": \"<dateTime>\",\n  \"currency\": \"EUR\",\n  \"customer_id\": null,\n  \"customer_snapshot\": {\n    \"last_name\": \"<string>\",\n    \"company_name\": \"<string>\",\n    \"acquire_options\": 2,\n    \"additional_groups_ids\": [\n      \"<integer>\",\n      \"<integer>\"\n    ],\n    \"bank_account\": \"<string>\",\n    \"bank_account_owner\": \"<string>\",\n    \"bank_bic\": \"<string>\",\n    \"bank_code\": \"<string>\",\n    \"bank_iban\": \"<string>\",\n    \"bank_name\": \"<string>\",\n    \"birth_date\": \"<date>\",\n    \"cash_allowance\": \"<float>\",\n    \"cash_allowance_days\": 7,\n    \"cash_discount\": \"<float>\",\n    \"cash_discount_type\": \"AMOUNT\",\n    \"city\": \"<string>\",\n    \"state\": \"<string>\",\n    \"country\": \"<string>\",\n    \"created_at\": \"<date>\",\n    \"updated_at\": \"<string>\",\n    \"delivery_title\": \"<string>\",\n    \"delivery_city\": \"<string>\",\n    \"delivery_state\": \"<string>\",\n    \"delivery_company_name\": \"<string>\",\n    \"delivery_country\": \"<string>\",\n    \"delivery_first_name\": \"<string>\",\n    \"delivery_last_name\": \"<string>\",\n    \"delivery_personal\": \"<boolean>\",\n    \"delivery_salutation\": 0,\n    \"delivery_street\": \"<string>\",\n    \"delivery_suffix_1\": \"<string>\",\n    \"delivery_suffix_2\": \"<string>\",\n    \"delivery_zip_code\": \"<string>\",\n    \"display_name\": \"<string>\",\n    \"emails\": [\n      \"<string>\",\n      \"<string>\"\n    ],\n    \"fax\": \"<string>\",\n    \"first_name\": \"<string>\",\n    \"grace_period\": \"<integer>\",\n    \"due_in_days\": \"<integer>\",\n    \"group_id\": \"<integer>\",\n    \"id\": \"<long>\",\n    \"info_1\": \"<string>\",\n    \"info_2\": \"<string>\",\n    \"internet\": \"<string>\",\n    \"login_id\": \"<long>\",\n    \"mobile\": \"<string>\",\n    \"note\": \"<string>\",\n    \"number\": \"<string>\",\n    \"payment_options\": 1,\n    \"personal\": false,\n    \"phone_1\": \"<string>\",\n    \"phone_2\": \"<string>\",\n    \"postbox\": \"<string>\",\n    \"postbox_city\": \"<string>\",\n    \"postbox_state\": \"<string>\",\n    \"postbox_country\": \"<string>\",\n    \"postbox_zip_code\": \"<string>\",\n    \"sale_price_level\": \"SALEPRICE6\",\n    \"salutation\": 0,\n    \"sepa_agreement\": \"BASIC\",\n    \"sepa_agreement_date\": \"<date>\",\n    \"sepa_mandate_reference\": \"<string>\",\n    \"since_date\": \"<date>\",\n    \"street\": \"<string>\",\n    \"suffix_1\": \"<string>\",\n    \"suffix_2\": \"<string>\",\n    \"tax_number\": \"<string>\",\n    \"court\": \"<string>\",\n    \"court_registry_number\": \"<string>\",\n    \"tax_options\": \"nStbIm\",\n    \"title\": \"<string>\",\n    \"archived\": \"<boolean>\",\n    \"vat_identifier\": \"<string>\",\n    \"zip_code\": \"<string>\",\n    \"document_pdf_type\": \"default\",\n    \"buyer_reference\": \"<string>\",\n    \"foreign_supplier_number\": \"<string>\"\n  },\n  \"discount\": null,\n  \"discount_type\": null,\n  \"document_date\": \"<date>\",\n  \"due_date\": \"<date>\",\n  \"edited_at\": \"<dateTime>\",\n  \"external_id\": null,\n  \"replica_url\": null,\n  \"grace_period\": \"<integer>\",\n  \"due_in_days\": \"<integer>\",\n  \"id\": \"<long>\",\n  \"is_acceptable_on_public_domain\": false,\n  \"is_archive\": false,\n  \"is_draft\": \"<boolean>\",\n  \"is_replica\": false,\n  \"is_oss\": false,\n  \"item_notes\": [\n    \"<string>\",\n    \"<string>\"\n  ],\n  \"items\": [\n    {\n      \"number\": null,\n      \"description\": null,\n      \"document_note\": \"<string>\",\n      \"quantity\": 1,\n      \"quantity_str\": \"<string>\",\n      \"unit\": null,\n      \"type\": \"POSITION\",\n      \"position\": \"<integer>\",\n      \"single_price_net\": null,\n      \"single_price_gross\": \"<float>\",\n      \"vat_percent\": 0,\n      \"discount\": null,\n      \"discount_type\": null,\n      \"position_id\": null,\n      \"total_price_net\": \"<float>\",\n      \"total_price_gross\": \"<float>\",\n      \"total_vat\": \"<float>\",\n      \"serial_number_id\": \"<string>\",\n      \"serial_number\": \"<string>\",\n      \"booking_account\": null,\n      \"export_cost_1\": null,\n      \"export_cost_2\": null,\n      \"cost_price_net\": null,\n      \"cost_price_total\": \"<float>\",\n      \"cost_price_charge\": \"<float>\",\n      \"cost_price_charge_type\": \"PERCENT\",\n      \"itemType\": \"UNDEFINED\",\n      \"id\": \"<long>\"\n    },\n    {\n      \"number\": null,\n      \"description\": null,\n      \"document_note\": \"<string>\",\n      \"quantity\": 1,\n      \"quantity_str\": \"<string>\",\n      \"unit\": null,\n      \"type\": \"POSITION\",\n      \"position\": \"<integer>\",\n      \"single_price_net\": null,\n      \"single_price_gross\": \"<float>\",\n      \"vat_percent\": 0,\n      \"discount\": null,\n      \"discount_type\": null,\n      \"position_id\": null,\n      \"total_price_net\": \"<float>\",\n      \"total_price_gross\": \"<float>\",\n      \"total_vat\": \"<float>\",\n      \"serial_number_id\": \"<string>\",\n      \"serial_number\": \"<string>\",\n      \"booking_account\": null,\n      \"export_cost_1\": null,\n      \"export_cost_2\": null,\n      \"cost_price_net\": null,\n      \"cost_price_total\": \"<float>\",\n      \"cost_price_charge\": \"<float>\",\n      \"cost_price_charge_type\": \"PERCENT\",\n      \"itemType\": \"UNDEFINED\",\n      \"id\": \"<long>\"\n    }\n  ],\n  \"last_postbox_id\": \"<long>\",\n  \"login_id\": \"<long>\",\n  \"number\": null,\n  \"order_number\": \"\",\n  \"buyer_reference\": \"\",\n  \"paid_amount\": \"<integer>\",\n  \"paid_at\": \"<date>\",\n  \"pdf_pages\": \"<integer>\",\n  \"pdf_template\": \"<string>\",\n  \"project_id\": null,\n  \"recurring_options\": {\n    \"next_date\": \"<date>\",\n    \"frequency\": \"MONTHLY\",\n    \"frequency_special\": null,\n    \"interval\": 1,\n    \"end_date_or_count\": null,\n    \"status\": \"WAITING\",\n    \"as_draft\": false,\n    \"is_notify\": false,\n    \"send_as\": null,\n    \"is_sign\": false,\n    \"is_paid\": false,\n    \"paid_date_option\": \"created_date\",\n    \"is_sepa\": false,\n    \"sepa_local_instrument\": null,\n    \"sepa_sequence_type\": null,\n    \"sepa_reference\": null,\n    \"sepa_remittance_information\": null,\n    \"target_type\": \"INVOICE\"\n  },\n  \"ref_id\": null,\n  \"root_id\": null,\n  \"service_date\": {\n    \"type\": \"SERVICE\",\n    \"date\": \"<date>\",\n    \"date_from\": \"<date>\",\n    \"date_to\": \"<date>\",\n    \"text\": null\n  },\n  \"shipping_country\": null,\n  \"status\": null,\n  \"text\": \"<string>\",\n  \"text_prefix\": \"<string>\",\n  \"text_tax\": null,\n  \"title\": null,\n  \"type\": \"INVOICE\",\n  \"use_shipping_address\": false,\n  \"vat_country\": null,\n  \"vat_id\": \"\",\n  \"fulfillment_country\": null,\n  \"vat_option\": null,\n  \"file_format_config\": [\n    {\n      \"type\": \"xrechnung2_2_xml\"\n    },\n    {\n      \"type\": \"xrechnung3_0_xml\"\n    }\n  ]\n}"
    },
    {
      "name": "Not found",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "Authorization",
            "value": "<API Key>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/documents/:id/cancel?use_text_from_template=false",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "documents",
            ":id",
            "cancel"
          ],
          "query": [
            {
              "key": "use_text_from_template",
              "value": "false",
              "description": "Use standard texts from the template."
            }
          ],
          "variable": [
            {
              "key": "id"
            }
          ]
        }
      },
      "status": "Not Found",
      "code": 404,
      "_postman_previewlanguage": "text",
      "header": [
      ],
      "cookie": [
      ],
      "body": ""
    },
    {
      "name": "Too Many Requests",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "Authorization",
            "value": "<API Key>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/documents/:id/cancel?use_text_from_template=false",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "documents",
            ":id",
            "cancel"
          ],
          "query": [
            {
              "key": "use_text_from_template",
              "value": "false",
              "description": "Use standard texts from the template."
            }
          ],
          "variable": [
            {
              "key": "id"
            }
          ]
        }
      },
      "status": "Too Many Requests",
      "code": 429,
      "_postman_previewlanguage": "text",
      "header": [
      ],
      "cookie": [
      ],
      "body": ""
    }
  ]
}