Back to Collection Items
var
http: TChilkatHttp;
success: Integer;
json: TChilkatJsonObject;
sbRequestBody: TChilkatStringBuilder;
resp: IChilkatHttpResponse;
sbResponseBody: TChilkatStringBuilder;
jResp: TChilkatJsonObject;
respStatusCode: Integer;
Date_from: TDtObj;
Date_to: TDtObj;
strVal: WideString;
description: WideString;
document_note: WideString;
quantity: Integer;
quantity_str: WideString;
unit: WideString;
position: WideString;
single_price_net: WideString;
single_price_gross: WideString;
vat_percent: Integer;
position_id: WideString;
total_price_net: WideString;
total_price_gross: WideString;
total_vat: WideString;
serial_number_id: WideString;
serial_number: WideString;
booking_account: WideString;
export_cost_1: WideString;
export_cost_2: WideString;
cost_price_net: WideString;
cost_price_total: WideString;
cost_price_charge: WideString;
cost_price_charge_type: WideString;
itemType: WideString;
Salutation: WideString;
Personal: WideString;
Title: WideString;
First_name: WideString;
Last_name: WideString;
Suffix_1: WideString;
Suffix_2: WideString;
Company_name: WideString;
Street: WideString;
Zip_code: WideString;
City: WideString;
State: WideString;
Country: WideString;
label_addressSalutation: WideString;
label_addressPersonal: WideString;
label_addressTitle: WideString;
label_addressFirst_name: WideString;
label_addressLast_name: WideString;
label_addressSuffix_1: WideString;
label_addressSuffix_2: WideString;
label_addressCompany_name: WideString;
label_addressStreet: WideString;
label_addressZip_code: WideString;
label_addressCity: WideString;
label_addressState: WideString;
label_addressCountry: WideString;
amount: WideString;
amount_net: WideString;
bank_debit_form: WideString;
billing_country: WideString;
calc_vat_from: Integer;
cancel_id: WideString;
cash_allowance: WideString;
cash_allowance_days: WideString;
cash_allowance_text: WideString;
contact_id: WideString;
contact_label: WideString;
contact_text: WideString;
created_at: WideString;
v_currency: WideString;
customer_id: WideString;
customer_snapshotLast_name: WideString;
customer_snapshotCompany_name: WideString;
Acquire_options: Integer;
Bank_account: WideString;
Bank_account_owner: WideString;
Bank_bic: WideString;
Bank_code: WideString;
Bank_iban: WideString;
Bank_name: WideString;
Birth_date: WideString;
Cash_allowance: WideString;
Cash_allowance_days: Integer;
Cash_discount: WideString;
Cash_discount_type: WideString;
customer_snapshotCity: WideString;
customer_snapshotState: WideString;
customer_snapshotCountry: WideString;
Created_at: WideString;
Updated_at: WideString;
Delivery_title: WideString;
Delivery_city: WideString;
Delivery_state: WideString;
Delivery_company_name: WideString;
Delivery_country: WideString;
Delivery_first_name: WideString;
Delivery_last_name: WideString;
Delivery_personal: WideString;
Delivery_salutation: Integer;
Delivery_street: WideString;
Delivery_suffix_1: WideString;
Delivery_suffix_2: WideString;
Delivery_zip_code: WideString;
Display_name: WideString;
Fax: WideString;
customer_snapshotFirst_name: WideString;
Grace_period: WideString;
Due_in_days: WideString;
Group_id: WideString;
Id: WideString;
Info_1: WideString;
Info_2: WideString;
Internet: WideString;
Login_id: WideString;
Mobile: WideString;
Note: WideString;
v_Number: WideString;
Payment_options: Integer;
customer_snapshotPersonal: Integer;
Phone_1: WideString;
Phone_2: WideString;
Postbox: WideString;
Postbox_city: WideString;
Postbox_state: WideString;
Postbox_country: WideString;
Postbox_zip_code: WideString;
Sale_price_level: WideString;
customer_snapshotSalutation: Integer;
Sepa_agreement: WideString;
Sepa_agreement_date: WideString;
Sepa_mandate_reference: WideString;
Since_date: WideString;
customer_snapshotStreet: WideString;
customer_snapshotSuffix_1: WideString;
customer_snapshotSuffix_2: WideString;
Tax_number: WideString;
Court: WideString;
Court_registry_number: WideString;
Tax_options: WideString;
customer_snapshotTitle: WideString;
Archived: WideString;
Vat_identifier: WideString;
customer_snapshotZip_code: WideString;
Document_pdf_type: WideString;
Buyer_reference: WideString;
Foreign_supplier_number: WideString;
discount: WideString;
discount_type: WideString;
document_date: WideString;
due_date: WideString;
edited_at: WideString;
external_id: WideString;
replica_url: WideString;
grace_period: WideString;
due_in_days: WideString;
id: WideString;
is_acceptable_on_public_domain: Integer;
is_archive: Integer;
is_draft: WideString;
is_replica: Integer;
is_oss: Integer;
last_postbox_id: WideString;
login_id: WideString;
v_number: WideString;
order_number: WideString;
buyer_reference: WideString;
paid_amount: WideString;
paid_at: WideString;
pdf_pages: WideString;
pdf_template: WideString;
project_id: WideString;
Next_date: WideString;
Frequency: WideString;
Frequency_special: WideString;
Interval: Integer;
End_date_or_count: WideString;
Status: WideString;
As_draft: Integer;
Is_notify: Integer;
Send_as: WideString;
Is_sign: Integer;
Is_paid: Integer;
Paid_date_option: WideString;
Is_sepa: Integer;
Sepa_local_instrument: WideString;
Sepa_sequence_type: WideString;
Sepa_reference: WideString;
Sepa_remittance_information: WideString;
Target_type: WideString;
ref_id: WideString;
root_id: WideString;
v_Type: WideString;
Date: WideString;
Text: WideString;
shipping_country: WideString;
status: WideString;
text: WideString;
text_prefix: WideString;
text_tax: WideString;
title: WideString;
v_type: WideString;
use_shipping_address: Integer;
vat_country: WideString;
vat_id: WideString;
fulfillment_country: WideString;
vat_option: WideString;
i: Integer;
count_i: Integer;
begin
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
http := TChilkatHttp.Create(Self);
// Use this online tool to generate code from sample JSON: Generate Code to Create JSON
// The following JSON is sent in the request body.
// {
// "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"
// }
// ]
// }
json := TChilkatJsonObject.Create(Self);
json.UpdateString('address.salutation','<integer>');
json.UpdateString('address.personal','<boolean>');
json.UpdateString('address.title','<string>');
json.UpdateString('address.first_name','<string>');
json.UpdateString('address.last_name','<string>');
json.UpdateString('address.suffix_1','<string>');
json.UpdateString('address.suffix_2','<string>');
json.UpdateString('address.company_name','<string>');
json.UpdateString('address.street','<string>');
json.UpdateString('address.zip_code','<string>');
json.UpdateString('address.city','<string>');
json.UpdateString('address.state','<string>');
json.UpdateString('address.country','<string>');
json.UpdateString('attachment_ids[0]','<integer>');
json.UpdateString('attachment_ids[1]','<integer>');
json.UpdateString('label_address.salutation','<integer>');
json.UpdateString('label_address.personal','<boolean>');
json.UpdateString('label_address.title','<string>');
json.UpdateString('label_address.first_name','<string>');
json.UpdateString('label_address.last_name','<string>');
json.UpdateString('label_address.suffix_1','<string>');
json.UpdateString('label_address.suffix_2','<string>');
json.UpdateString('label_address.company_name','<string>');
json.UpdateString('label_address.street','<string>');
json.UpdateString('label_address.zip_code','<string>');
json.UpdateString('label_address.city','<string>');
json.UpdateString('label_address.state','<string>');
json.UpdateString('label_address.country','<string>');
json.UpdateString('amount','<integer>');
json.UpdateString('amount_net','<integer>');
json.UpdateNull('bank_debit_form');
json.UpdateString('billing_country','<string>');
json.UpdateInt('calc_vat_from',0);
json.UpdateString('cancel_id','<long>');
json.UpdateNull('cash_allowance');
json.UpdateNull('cash_allowance_days');
json.UpdateNull('cash_allowance_text');
json.UpdateNull('contact_id');
json.UpdateString('contact_label','');
json.UpdateString('contact_text','');
json.UpdateString('created_at','<dateTime>');
json.UpdateString('currency','EUR');
json.UpdateNull('customer_id');
json.UpdateString('customer_snapshot.last_name','<string>');
json.UpdateString('customer_snapshot.company_name','<string>');
json.UpdateInt('customer_snapshot.acquire_options',2);
json.UpdateString('customer_snapshot.additional_groups_ids[0]','<integer>');
json.UpdateString('customer_snapshot.additional_groups_ids[1]','<integer>');
json.UpdateString('customer_snapshot.bank_account','<string>');
json.UpdateString('customer_snapshot.bank_account_owner','<string>');
json.UpdateString('customer_snapshot.bank_bic','<string>');
json.UpdateString('customer_snapshot.bank_code','<string>');
json.UpdateString('customer_snapshot.bank_iban','<string>');
json.UpdateString('customer_snapshot.bank_name','<string>');
json.UpdateString('customer_snapshot.birth_date','<date>');
json.UpdateString('customer_snapshot.cash_allowance','<float>');
json.UpdateInt('customer_snapshot.cash_allowance_days',7);
json.UpdateString('customer_snapshot.cash_discount','<float>');
json.UpdateString('customer_snapshot.cash_discount_type','AMOUNT');
json.UpdateString('customer_snapshot.city','<string>');
json.UpdateString('customer_snapshot.state','<string>');
json.UpdateString('customer_snapshot.country','<string>');
json.UpdateString('customer_snapshot.created_at','<date>');
json.UpdateString('customer_snapshot.updated_at','<string>');
json.UpdateString('customer_snapshot.delivery_title','<string>');
json.UpdateString('customer_snapshot.delivery_city','<string>');
json.UpdateString('customer_snapshot.delivery_state','<string>');
json.UpdateString('customer_snapshot.delivery_company_name','<string>');
json.UpdateString('customer_snapshot.delivery_country','<string>');
json.UpdateString('customer_snapshot.delivery_first_name','<string>');
json.UpdateString('customer_snapshot.delivery_last_name','<string>');
json.UpdateString('customer_snapshot.delivery_personal','<boolean>');
json.UpdateInt('customer_snapshot.delivery_salutation',0);
json.UpdateString('customer_snapshot.delivery_street','<string>');
json.UpdateString('customer_snapshot.delivery_suffix_1','<string>');
json.UpdateString('customer_snapshot.delivery_suffix_2','<string>');
json.UpdateString('customer_snapshot.delivery_zip_code','<string>');
json.UpdateString('customer_snapshot.display_name','<string>');
json.UpdateString('customer_snapshot.emails[0]','<string>');
json.UpdateString('customer_snapshot.emails[1]','<string>');
json.UpdateString('customer_snapshot.fax','<string>');
json.UpdateString('customer_snapshot.first_name','<string>');
json.UpdateString('customer_snapshot.grace_period','<integer>');
json.UpdateString('customer_snapshot.due_in_days','<integer>');
json.UpdateString('customer_snapshot.group_id','<integer>');
json.UpdateString('customer_snapshot.id','<long>');
json.UpdateString('customer_snapshot.info_1','<string>');
json.UpdateString('customer_snapshot.info_2','<string>');
json.UpdateString('customer_snapshot.internet','<string>');
json.UpdateString('customer_snapshot.login_id','<long>');
json.UpdateString('customer_snapshot.mobile','<string>');
json.UpdateString('customer_snapshot.note','<string>');
json.UpdateString('customer_snapshot.number','<string>');
json.UpdateInt('customer_snapshot.payment_options',1);
json.UpdateBool('customer_snapshot.personal',0);
json.UpdateString('customer_snapshot.phone_1','<string>');
json.UpdateString('customer_snapshot.phone_2','<string>');
json.UpdateString('customer_snapshot.postbox','<string>');
json.UpdateString('customer_snapshot.postbox_city','<string>');
json.UpdateString('customer_snapshot.postbox_state','<string>');
json.UpdateString('customer_snapshot.postbox_country','<string>');
json.UpdateString('customer_snapshot.postbox_zip_code','<string>');
json.UpdateString('customer_snapshot.sale_price_level','SALEPRICE6');
json.UpdateInt('customer_snapshot.salutation',0);
json.UpdateString('customer_snapshot.sepa_agreement','BASIC');
json.UpdateString('customer_snapshot.sepa_agreement_date','<date>');
json.UpdateString('customer_snapshot.sepa_mandate_reference','<string>');
json.UpdateString('customer_snapshot.since_date','<date>');
json.UpdateString('customer_snapshot.street','<string>');
json.UpdateString('customer_snapshot.suffix_1','<string>');
json.UpdateString('customer_snapshot.suffix_2','<string>');
json.UpdateString('customer_snapshot.tax_number','<string>');
json.UpdateString('customer_snapshot.court','<string>');
json.UpdateString('customer_snapshot.court_registry_number','<string>');
json.UpdateString('customer_snapshot.tax_options','nStbIm');
json.UpdateString('customer_snapshot.title','<string>');
json.UpdateString('customer_snapshot.archived','<boolean>');
json.UpdateString('customer_snapshot.vat_identifier','<string>');
json.UpdateString('customer_snapshot.zip_code','<string>');
json.UpdateString('customer_snapshot.document_pdf_type','default');
json.UpdateString('customer_snapshot.buyer_reference','<string>');
json.UpdateString('customer_snapshot.foreign_supplier_number','<string>');
json.UpdateNull('discount');
json.UpdateNull('discount_type');
json.UpdateString('document_date','<date>');
json.UpdateString('due_date','<date>');
json.UpdateString('edited_at','<dateTime>');
json.UpdateNull('external_id');
json.UpdateNull('replica_url');
json.UpdateString('grace_period','<integer>');
json.UpdateString('due_in_days','<integer>');
json.UpdateString('id','<long>');
json.UpdateBool('is_acceptable_on_public_domain',0);
json.UpdateBool('is_archive',0);
json.UpdateString('is_draft','<boolean>');
json.UpdateBool('is_replica',0);
json.UpdateBool('is_oss',0);
json.UpdateString('item_notes[0]','<string>');
json.UpdateString('item_notes[1]','<string>');
json.UpdateNull('items[0].number');
json.UpdateNull('items[0].description');
json.UpdateString('items[0].document_note','<string>');
json.UpdateInt('items[0].quantity',1);
json.UpdateString('items[0].quantity_str','<string>');
json.UpdateNull('items[0].unit');
json.UpdateString('items[0].type','POSITION');
json.UpdateString('items[0].position','<integer>');
json.UpdateNull('items[0].single_price_net');
json.UpdateString('items[0].single_price_gross','<float>');
json.UpdateInt('items[0].vat_percent',0);
json.UpdateNull('items[0].discount');
json.UpdateNull('items[0].discount_type');
json.UpdateNull('items[0].position_id');
json.UpdateString('items[0].total_price_net','<float>');
json.UpdateString('items[0].total_price_gross','<float>');
json.UpdateString('items[0].total_vat','<float>');
json.UpdateString('items[0].serial_number_id','<string>');
json.UpdateString('items[0].serial_number','<string>');
json.UpdateNull('items[0].booking_account');
json.UpdateNull('items[0].export_cost_1');
json.UpdateNull('items[0].export_cost_2');
json.UpdateNull('items[0].cost_price_net');
json.UpdateString('items[0].cost_price_total','<float>');
json.UpdateString('items[0].cost_price_charge','<float>');
json.UpdateString('items[0].cost_price_charge_type','PERCENT');
json.UpdateString('items[0].itemType','UNDEFINED');
json.UpdateString('items[0].id','<long>');
json.UpdateNull('items[1].number');
json.UpdateNull('items[1].description');
json.UpdateString('items[1].document_note','<string>');
json.UpdateInt('items[1].quantity',1);
json.UpdateString('items[1].quantity_str','<string>');
json.UpdateNull('items[1].unit');
json.UpdateString('items[1].type','POSITION');
json.UpdateString('items[1].position','<integer>');
json.UpdateNull('items[1].single_price_net');
json.UpdateString('items[1].single_price_gross','<float>');
json.UpdateInt('items[1].vat_percent',0);
json.UpdateNull('items[1].discount');
json.UpdateNull('items[1].discount_type');
json.UpdateNull('items[1].position_id');
json.UpdateString('items[1].total_price_net','<float>');
json.UpdateString('items[1].total_price_gross','<float>');
json.UpdateString('items[1].total_vat','<float>');
json.UpdateString('items[1].serial_number_id','<string>');
json.UpdateString('items[1].serial_number','<string>');
json.UpdateNull('items[1].booking_account');
json.UpdateNull('items[1].export_cost_1');
json.UpdateNull('items[1].export_cost_2');
json.UpdateNull('items[1].cost_price_net');
json.UpdateString('items[1].cost_price_total','<float>');
json.UpdateString('items[1].cost_price_charge','<float>');
json.UpdateString('items[1].cost_price_charge_type','PERCENT');
json.UpdateString('items[1].itemType','UNDEFINED');
json.UpdateString('items[1].id','<long>');
json.UpdateString('last_postbox_id','<long>');
json.UpdateString('login_id','<long>');
json.UpdateNull('number');
json.UpdateString('order_number','');
json.UpdateString('buyer_reference','');
json.UpdateString('paid_amount','<integer>');
json.UpdateString('paid_at','<date>');
json.UpdateString('pdf_pages','<integer>');
json.UpdateString('pdf_template','<string>');
json.UpdateNull('project_id');
json.UpdateString('recurring_options.next_date','<date>');
json.UpdateString('recurring_options.frequency','MONTHLY');
json.UpdateNull('recurring_options.frequency_special');
json.UpdateInt('recurring_options.interval',1);
json.UpdateNull('recurring_options.end_date_or_count');
json.UpdateString('recurring_options.status','WAITING');
json.UpdateBool('recurring_options.as_draft',0);
json.UpdateBool('recurring_options.is_notify',0);
json.UpdateNull('recurring_options.send_as');
json.UpdateBool('recurring_options.is_sign',0);
json.UpdateBool('recurring_options.is_paid',0);
json.UpdateString('recurring_options.paid_date_option','created_date');
json.UpdateBool('recurring_options.is_sepa',0);
json.UpdateNull('recurring_options.sepa_local_instrument');
json.UpdateNull('recurring_options.sepa_sequence_type');
json.UpdateNull('recurring_options.sepa_reference');
json.UpdateNull('recurring_options.sepa_remittance_information');
json.UpdateString('recurring_options.target_type','INVOICE');
json.UpdateNull('ref_id');
json.UpdateNull('root_id');
json.UpdateString('service_date.type','SERVICE');
json.UpdateString('service_date.date','<date>');
json.UpdateString('service_date.date_from','<date>');
json.UpdateString('service_date.date_to','<date>');
json.UpdateNull('service_date.text');
json.UpdateNull('shipping_country');
json.UpdateNull('status');
json.UpdateString('text','<string>');
json.UpdateString('text_prefix','<string>');
json.UpdateNull('text_tax');
json.UpdateNull('title');
json.UpdateString('type','INVOICE');
json.UpdateBool('use_shipping_address',0);
json.UpdateNull('vat_country');
json.UpdateString('vat_id','');
json.UpdateNull('fulfillment_country');
json.UpdateNull('vat_option');
json.UpdateString('file_format_config[0].type','xrechnung2_2_xml');
json.UpdateString('file_format_config[1].type','xrechnung3_0_xml');
http.SetRequestHeader('Content-Type','application/json');
http.SetRequestHeader('Authorization','{{apiKey}}');
http.SetRequestHeader('Accept','application/json');
sbRequestBody := TChilkatStringBuilder.Create(Self);
json.EmitSb(sbRequestBody.ControlInterface);
resp := http.PTextSb('PUT','https://api.easybill.de/rest/v1/documents/:id?refresh_customer_data=true&reason_for_change=<string>',sbRequestBody.ControlInterface,'utf-8','application/json',0,0);
if (http.LastMethodSuccess = 0) then
begin
Memo1.Lines.Add(http.LastErrorText);
Exit;
end;
sbResponseBody := TChilkatStringBuilder.Create(Self);
resp.GetBodySb(sbResponseBody.ControlInterface);
jResp := TChilkatJsonObject.Create(Self);
jResp.LoadSb(sbResponseBody.ControlInterface);
jResp.EmitCompact := 0;
Memo1.Lines.Add('Response Body:');
Memo1.Lines.Add(jResp.Emit());
respStatusCode := resp.StatusCode;
Memo1.Lines.Add('Response Status Code = ' + IntToStr(respStatusCode));
if (respStatusCode >= 400) then
begin
Memo1.Lines.Add('Response Header:');
Memo1.Lines.Add(resp.Header);
Memo1.Lines.Add('Failed.');
Exit;
end;
// 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
Date_from := TDtObj.Create(Self);
Date_to := TDtObj.Create(Self);
Salutation := jResp.StringOf('address.salutation');
Personal := jResp.StringOf('address.personal');
Title := jResp.StringOf('address.title');
First_name := jResp.StringOf('address.first_name');
Last_name := jResp.StringOf('address.last_name');
Suffix_1 := jResp.StringOf('address.suffix_1');
Suffix_2 := jResp.StringOf('address.suffix_2');
Company_name := jResp.StringOf('address.company_name');
Street := jResp.StringOf('address.street');
Zip_code := jResp.StringOf('address.zip_code');
City := jResp.StringOf('address.city');
State := jResp.StringOf('address.state');
Country := jResp.StringOf('address.country');
label_addressSalutation := jResp.StringOf('label_address.salutation');
label_addressPersonal := jResp.StringOf('label_address.personal');
label_addressTitle := jResp.StringOf('label_address.title');
label_addressFirst_name := jResp.StringOf('label_address.first_name');
label_addressLast_name := jResp.StringOf('label_address.last_name');
label_addressSuffix_1 := jResp.StringOf('label_address.suffix_1');
label_addressSuffix_2 := jResp.StringOf('label_address.suffix_2');
label_addressCompany_name := jResp.StringOf('label_address.company_name');
label_addressStreet := jResp.StringOf('label_address.street');
label_addressZip_code := jResp.StringOf('label_address.zip_code');
label_addressCity := jResp.StringOf('label_address.city');
label_addressState := jResp.StringOf('label_address.state');
label_addressCountry := jResp.StringOf('label_address.country');
amount := jResp.StringOf('amount');
amount_net := jResp.StringOf('amount_net');
bank_debit_form := jResp.StringOf('bank_debit_form');
billing_country := jResp.StringOf('billing_country');
calc_vat_from := jResp.IntOf('calc_vat_from');
cancel_id := jResp.StringOf('cancel_id');
cash_allowance := jResp.StringOf('cash_allowance');
cash_allowance_days := jResp.StringOf('cash_allowance_days');
cash_allowance_text := jResp.StringOf('cash_allowance_text');
contact_id := jResp.StringOf('contact_id');
contact_label := jResp.StringOf('contact_label');
contact_text := jResp.StringOf('contact_text');
created_at := jResp.StringOf('created_at');
v_currency := jResp.StringOf('currency');
customer_id := jResp.StringOf('customer_id');
customer_snapshotLast_name := jResp.StringOf('customer_snapshot.last_name');
customer_snapshotCompany_name := jResp.StringOf('customer_snapshot.company_name');
Acquire_options := jResp.IntOf('customer_snapshot.acquire_options');
Bank_account := jResp.StringOf('customer_snapshot.bank_account');
Bank_account_owner := jResp.StringOf('customer_snapshot.bank_account_owner');
Bank_bic := jResp.StringOf('customer_snapshot.bank_bic');
Bank_code := jResp.StringOf('customer_snapshot.bank_code');
Bank_iban := jResp.StringOf('customer_snapshot.bank_iban');
Bank_name := jResp.StringOf('customer_snapshot.bank_name');
Birth_date := jResp.StringOf('customer_snapshot.birth_date');
Cash_allowance := jResp.StringOf('customer_snapshot.cash_allowance');
Cash_allowance_days := jResp.IntOf('customer_snapshot.cash_allowance_days');
Cash_discount := jResp.StringOf('customer_snapshot.cash_discount');
Cash_discount_type := jResp.StringOf('customer_snapshot.cash_discount_type');
customer_snapshotCity := jResp.StringOf('customer_snapshot.city');
customer_snapshotState := jResp.StringOf('customer_snapshot.state');
customer_snapshotCountry := jResp.StringOf('customer_snapshot.country');
Created_at := jResp.StringOf('customer_snapshot.created_at');
Updated_at := jResp.StringOf('customer_snapshot.updated_at');
Delivery_title := jResp.StringOf('customer_snapshot.delivery_title');
Delivery_city := jResp.StringOf('customer_snapshot.delivery_city');
Delivery_state := jResp.StringOf('customer_snapshot.delivery_state');
Delivery_company_name := jResp.StringOf('customer_snapshot.delivery_company_name');
Delivery_country := jResp.StringOf('customer_snapshot.delivery_country');
Delivery_first_name := jResp.StringOf('customer_snapshot.delivery_first_name');
Delivery_last_name := jResp.StringOf('customer_snapshot.delivery_last_name');
Delivery_personal := jResp.StringOf('customer_snapshot.delivery_personal');
Delivery_salutation := jResp.IntOf('customer_snapshot.delivery_salutation');
Delivery_street := jResp.StringOf('customer_snapshot.delivery_street');
Delivery_suffix_1 := jResp.StringOf('customer_snapshot.delivery_suffix_1');
Delivery_suffix_2 := jResp.StringOf('customer_snapshot.delivery_suffix_2');
Delivery_zip_code := jResp.StringOf('customer_snapshot.delivery_zip_code');
Display_name := jResp.StringOf('customer_snapshot.display_name');
Fax := jResp.StringOf('customer_snapshot.fax');
customer_snapshotFirst_name := jResp.StringOf('customer_snapshot.first_name');
Grace_period := jResp.StringOf('customer_snapshot.grace_period');
Due_in_days := jResp.StringOf('customer_snapshot.due_in_days');
Group_id := jResp.StringOf('customer_snapshot.group_id');
Id := jResp.StringOf('customer_snapshot.id');
Info_1 := jResp.StringOf('customer_snapshot.info_1');
Info_2 := jResp.StringOf('customer_snapshot.info_2');
Internet := jResp.StringOf('customer_snapshot.internet');
Login_id := jResp.StringOf('customer_snapshot.login_id');
Mobile := jResp.StringOf('customer_snapshot.mobile');
Note := jResp.StringOf('customer_snapshot.note');
v_Number := jResp.StringOf('customer_snapshot.number');
Payment_options := jResp.IntOf('customer_snapshot.payment_options');
customer_snapshotPersonal := jResp.BoolOf('customer_snapshot.personal');
Phone_1 := jResp.StringOf('customer_snapshot.phone_1');
Phone_2 := jResp.StringOf('customer_snapshot.phone_2');
Postbox := jResp.StringOf('customer_snapshot.postbox');
Postbox_city := jResp.StringOf('customer_snapshot.postbox_city');
Postbox_state := jResp.StringOf('customer_snapshot.postbox_state');
Postbox_country := jResp.StringOf('customer_snapshot.postbox_country');
Postbox_zip_code := jResp.StringOf('customer_snapshot.postbox_zip_code');
Sale_price_level := jResp.StringOf('customer_snapshot.sale_price_level');
customer_snapshotSalutation := jResp.IntOf('customer_snapshot.salutation');
Sepa_agreement := jResp.StringOf('customer_snapshot.sepa_agreement');
Sepa_agreement_date := jResp.StringOf('customer_snapshot.sepa_agreement_date');
Sepa_mandate_reference := jResp.StringOf('customer_snapshot.sepa_mandate_reference');
Since_date := jResp.StringOf('customer_snapshot.since_date');
customer_snapshotStreet := jResp.StringOf('customer_snapshot.street');
customer_snapshotSuffix_1 := jResp.StringOf('customer_snapshot.suffix_1');
customer_snapshotSuffix_2 := jResp.StringOf('customer_snapshot.suffix_2');
Tax_number := jResp.StringOf('customer_snapshot.tax_number');
Court := jResp.StringOf('customer_snapshot.court');
Court_registry_number := jResp.StringOf('customer_snapshot.court_registry_number');
Tax_options := jResp.StringOf('customer_snapshot.tax_options');
customer_snapshotTitle := jResp.StringOf('customer_snapshot.title');
Archived := jResp.StringOf('customer_snapshot.archived');
Vat_identifier := jResp.StringOf('customer_snapshot.vat_identifier');
customer_snapshotZip_code := jResp.StringOf('customer_snapshot.zip_code');
Document_pdf_type := jResp.StringOf('customer_snapshot.document_pdf_type');
Buyer_reference := jResp.StringOf('customer_snapshot.buyer_reference');
Foreign_supplier_number := jResp.StringOf('customer_snapshot.foreign_supplier_number');
discount := jResp.StringOf('discount');
discount_type := jResp.StringOf('discount_type');
document_date := jResp.StringOf('document_date');
due_date := jResp.StringOf('due_date');
edited_at := jResp.StringOf('edited_at');
external_id := jResp.StringOf('external_id');
replica_url := jResp.StringOf('replica_url');
grace_period := jResp.StringOf('grace_period');
due_in_days := jResp.StringOf('due_in_days');
id := jResp.StringOf('id');
is_acceptable_on_public_domain := jResp.BoolOf('is_acceptable_on_public_domain');
is_archive := jResp.BoolOf('is_archive');
is_draft := jResp.StringOf('is_draft');
is_replica := jResp.BoolOf('is_replica');
is_oss := jResp.BoolOf('is_oss');
last_postbox_id := jResp.StringOf('last_postbox_id');
login_id := jResp.StringOf('login_id');
v_number := jResp.StringOf('number');
order_number := jResp.StringOf('order_number');
buyer_reference := jResp.StringOf('buyer_reference');
paid_amount := jResp.StringOf('paid_amount');
paid_at := jResp.StringOf('paid_at');
pdf_pages := jResp.StringOf('pdf_pages');
pdf_template := jResp.StringOf('pdf_template');
project_id := jResp.StringOf('project_id');
Next_date := jResp.StringOf('recurring_options.next_date');
Frequency := jResp.StringOf('recurring_options.frequency');
Frequency_special := jResp.StringOf('recurring_options.frequency_special');
Interval := jResp.IntOf('recurring_options.interval');
End_date_or_count := jResp.StringOf('recurring_options.end_date_or_count');
Status := jResp.StringOf('recurring_options.status');
As_draft := jResp.BoolOf('recurring_options.as_draft');
Is_notify := jResp.BoolOf('recurring_options.is_notify');
Send_as := jResp.StringOf('recurring_options.send_as');
Is_sign := jResp.BoolOf('recurring_options.is_sign');
Is_paid := jResp.BoolOf('recurring_options.is_paid');
Paid_date_option := jResp.StringOf('recurring_options.paid_date_option');
Is_sepa := jResp.BoolOf('recurring_options.is_sepa');
Sepa_local_instrument := jResp.StringOf('recurring_options.sepa_local_instrument');
Sepa_sequence_type := jResp.StringOf('recurring_options.sepa_sequence_type');
Sepa_reference := jResp.StringOf('recurring_options.sepa_reference');
Sepa_remittance_information := jResp.StringOf('recurring_options.sepa_remittance_information');
Target_type := jResp.StringOf('recurring_options.target_type');
ref_id := jResp.StringOf('ref_id');
root_id := jResp.StringOf('root_id');
v_Type := jResp.StringOf('service_date.type');
Date := jResp.StringOf('service_date.date');
jResp.DtOf('service_date.date_from',0,Date_from.ControlInterface);
jResp.DtOf('service_date.date_to',0,Date_to.ControlInterface);
Text := jResp.StringOf('service_date.text');
shipping_country := jResp.StringOf('shipping_country');
status := jResp.StringOf('status');
text := jResp.StringOf('text');
text_prefix := jResp.StringOf('text_prefix');
text_tax := jResp.StringOf('text_tax');
title := jResp.StringOf('title');
v_type := jResp.StringOf('type');
use_shipping_address := jResp.BoolOf('use_shipping_address');
vat_country := jResp.StringOf('vat_country');
vat_id := jResp.StringOf('vat_id');
fulfillment_country := jResp.StringOf('fulfillment_country');
vat_option := jResp.StringOf('vat_option');
i := 0;
count_i := jResp.SizeOfArray('attachment_ids');
while i < count_i do
begin
jResp.I := i;
strVal := jResp.StringOf('attachment_ids[i]');
i := i + 1;
end;
i := 0;
count_i := jResp.SizeOfArray('customer_snapshot.additional_groups_ids');
while i < count_i do
begin
jResp.I := i;
strVal := jResp.StringOf('customer_snapshot.additional_groups_ids[i]');
i := i + 1;
end;
i := 0;
count_i := jResp.SizeOfArray('customer_snapshot.emails');
while i < count_i do
begin
jResp.I := i;
strVal := jResp.StringOf('customer_snapshot.emails[i]');
i := i + 1;
end;
i := 0;
count_i := jResp.SizeOfArray('item_notes');
while i < count_i do
begin
jResp.I := i;
strVal := jResp.StringOf('item_notes[i]');
i := i + 1;
end;
i := 0;
count_i := jResp.SizeOfArray('items');
while i < count_i do
begin
jResp.I := i;
v_number := jResp.StringOf('items[i].number');
description := jResp.StringOf('items[i].description');
document_note := jResp.StringOf('items[i].document_note');
quantity := jResp.IntOf('items[i].quantity');
quantity_str := jResp.StringOf('items[i].quantity_str');
unit := jResp.StringOf('items[i].unit');
v_type := jResp.StringOf('items[i].type');
position := jResp.StringOf('items[i].position');
single_price_net := jResp.StringOf('items[i].single_price_net');
single_price_gross := jResp.StringOf('items[i].single_price_gross');
vat_percent := jResp.IntOf('items[i].vat_percent');
discount := jResp.StringOf('items[i].discount');
discount_type := jResp.StringOf('items[i].discount_type');
position_id := jResp.StringOf('items[i].position_id');
total_price_net := jResp.StringOf('items[i].total_price_net');
total_price_gross := jResp.StringOf('items[i].total_price_gross');
total_vat := jResp.StringOf('items[i].total_vat');
serial_number_id := jResp.StringOf('items[i].serial_number_id');
serial_number := jResp.StringOf('items[i].serial_number');
booking_account := jResp.StringOf('items[i].booking_account');
export_cost_1 := jResp.StringOf('items[i].export_cost_1');
export_cost_2 := jResp.StringOf('items[i].export_cost_2');
cost_price_net := jResp.StringOf('items[i].cost_price_net');
cost_price_total := jResp.StringOf('items[i].cost_price_total');
cost_price_charge := jResp.StringOf('items[i].cost_price_charge');
cost_price_charge_type := jResp.StringOf('items[i].cost_price_charge_type');
itemType := jResp.StringOf('items[i].itemType');
id := jResp.StringOf('items[i].id');
i := i + 1;
end;
i := 0;
count_i := jResp.SizeOfArray('file_format_config');
while i < count_i do
begin
jResp.I := i;
v_type := jResp.StringOf('file_format_config[i].type');
i := i + 1;
end;
Curl Command
curl -X PUT
-H "Authorization: {{apiKey}}"
-H "Content-Type: application/json"
-H "Accept: application/json"
-d '{
"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"
}
]
}'
https://api.easybill.de/rest/v1/documents/:id?refresh_customer_data=true&reason_for_change=<string>
Postman Collection Item JSON
{
"name": "Update document",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\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}",
"options": {
"raw": {
"headerFamily": "json",
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/documents/:id?refresh_customer_data=true&reason_for_change=<string>",
"host": [
"{{baseUrl}}"
],
"path": [
"documents",
":id"
],
"query": [
{
"key": "refresh_customer_data",
"value": "true",
"description": "Forces refreshing of the customer data."
},
{
"key": "reason_for_change",
"value": "<string>",
"description": "A string that is saved on the document version as reason. This value takes only affect if you update an already finalized document and provide this value."
}
],
"variable": [
{
"key": "id",
"value": "<long>",
"description": "(Required) ID of document"
}
]
}
},
"response": [
{
"name": "Successful operation",
"originalRequest": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
},
{
"description": "Added as a part of security scheme: apikey",
"key": "Authorization",
"value": "<API Key>"
}
],
"body": {
"mode": "raw",
"raw": "{\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}",
"options": {
"raw": {
"headerFamily": "json",
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/documents/:id?refresh_customer_data=true&reason_for_change=<string>",
"host": [
"{{baseUrl}}"
],
"path": [
"documents",
":id"
],
"query": [
{
"key": "refresh_customer_data",
"value": "true",
"description": "Forces refreshing of the customer data."
},
{
"key": "reason_for_change",
"value": "<string>",
"description": "A string that is saved on the document version as reason. This value takes only affect if you update an already finalized document and provide this value."
}
],
"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": "Invalid Document",
"originalRequest": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"description": "Added as a part of security scheme: apikey",
"key": "Authorization",
"value": "<API Key>"
}
],
"body": {
"mode": "raw",
"raw": "{\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}",
"options": {
"raw": {
"headerFamily": "json",
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/documents/:id?refresh_customer_data=true&reason_for_change=<string>",
"host": [
"{{baseUrl}}"
],
"path": [
"documents",
":id"
],
"query": [
{
"key": "refresh_customer_data",
"value": "true",
"description": "Forces refreshing of the customer data."
},
{
"key": "reason_for_change",
"value": "<string>",
"description": "A string that is saved on the document version as reason. This value takes only affect if you update an already finalized document and provide this value."
}
],
"variable": [
{
"key": "id"
}
]
}
},
"status": "Bad Request",
"code": 400,
"_postman_previewlanguage": "text",
"header": [
],
"cookie": [
],
"body": ""
},
{
"name": "Resource is locked. This status is returned if a process is currently running which locks the requested resource. Try again later.",
"originalRequest": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"description": "Added as a part of security scheme: apikey",
"key": "Authorization",
"value": "<API Key>"
}
],
"body": {
"mode": "raw",
"raw": "{\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}",
"options": {
"raw": {
"headerFamily": "json",
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/documents/:id?refresh_customer_data=true&reason_for_change=<string>",
"host": [
"{{baseUrl}}"
],
"path": [
"documents",
":id"
],
"query": [
{
"key": "refresh_customer_data",
"value": "true",
"description": "Forces refreshing of the customer data."
},
{
"key": "reason_for_change",
"value": "<string>",
"description": "A string that is saved on the document version as reason. This value takes only affect if you update an already finalized document and provide this value."
}
],
"variable": [
{
"key": "id"
}
]
}
},
"status": "Conflict",
"code": 409,
"_postman_previewlanguage": "text",
"header": [
],
"cookie": [
],
"body": ""
},
{
"name": "Too Many Requests",
"originalRequest": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"description": "Added as a part of security scheme: apikey",
"key": "Authorization",
"value": "<API Key>"
}
],
"body": {
"mode": "raw",
"raw": "{\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}",
"options": {
"raw": {
"headerFamily": "json",
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/documents/:id?refresh_customer_data=true&reason_for_change=<string>",
"host": [
"{{baseUrl}}"
],
"path": [
"documents",
":id"
],
"query": [
{
"key": "refresh_customer_data",
"value": "true",
"description": "Forces refreshing of the customer data."
},
{
"key": "reason_for_change",
"value": "<string>",
"description": "A string that is saved on the document version as reason. This value takes only affect if you update an already finalized document and provide this value."
}
],
"variable": [
{
"key": "id"
}
]
}
},
"status": "Too Many Requests",
"code": 429,
"_postman_previewlanguage": "text",
"header": [
],
"cookie": [
],
"body": ""
}
]
}