Chilkat Online Tools

ERROR!

------------------- GenerateCode ----------------------
ImpliedContentType: application/json
explicitContentType: application/json
---- begin chilkat script ----
// This example assumes the Chilkat API to have been previously unlocked.
// See {{-global_unlock:::Global Unlock Sample-}} for sample code.

new Http http;
ckbool success;

http.BasicAuth = cktrue;
http.Login = "{{secretId}}";
http.Password = "{{secretPassword}}";

// Use this online tool to generate code from sample JSON: {{.https://tools.chilkat.io/jsonCreate|||Generate Code to Create JSON.}}

// The following JSON is sent in the request body.

// {
//   "date_from": "2020-01-01",
//   "date_to": "2020-02-01",
//   "link": "d4617561-1c01-4b2f-83b6-a594f7b3bc57",
//   "type": "OUTFLOW",
//   "attach_xml": false,
//   "save_data": true
// }

new JsonObject json;
ignore = json.UpdateString("date_from","2020-01-01");
ignore = json.UpdateString("date_to","2020-02-01");
ignore = json.UpdateString("link","d4617561-1c01-4b2f-83b6-a594f7b3bc57");
ignore = json.UpdateString("type","OUTFLOW");
ignore = json.UpdateBool("attach_xml",ckfalse);
ignore = json.UpdateBool("save_data",cktrue);

call http.SetRequestHeader("Content-Type","application/json");

HttpResponse resp = http.PostJson3("https://domain.com/api/invoices/","application/json",json);
if (http.LastMethodSuccess == ckfalse) {
    println http.LastErrorText;
    return;
}

new StringBuilder sbResponseBody;
ignore = resp.GetBodySb(sbResponseBody);

new JsonArray jarrResp;
call jarrResp.LoadSb(sbResponseBody);
jarrResp.EmitCompact = ckfalse;

println "Response Body:";
println jarrResp.Emit();

int respStatusCode = resp.StatusCode;
println "Response Status Code = ",respStatusCode;
if (respStatusCode >= 400) {
    println "Response Header:";
    println resp.Header;
    println "Failed.";
    delete resp;
    return;
}
delete resp;

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

// [
//   {
//     "link": "<string>",
//     "collected_at": "<dateTime>",
//     "invoice_identification": "<string>",
//     "invoice_date": "<date>",
//     "status": "<string>",
//     "invoice_type": "<string>",
//     "type": "incididunt exercitation anim dolore",
//     "sender_id": "<string>",
//     "sender_name": "<string>",
//     "receiver_id": "<string>",
//     "receiver_name": "<string>",
//     "cancelation_status": "<string>",
//     "cancelation_update_date": "<date>",
//     "certification_date": "<date>",
//     "certification_authority": "<string>",
//     "payment_type": "<string>",
//     "payment_type_description": "<string>",
//     "payment_method": "<string>",
//     "payment_method_description": "<string>",
//     "usage": "<string>",
//     "version": "<string>",
//     "place_of_issue": "<string>",
//     "invoice_details": [
//       {
//         "description": "<string>",
//         "product_identification": "<string>",
//         "quantity": "<integer>",
//         "unit_code": "<string>",
//         "unit_description": "<string>",
//         "unit_amount": "<number>",
//         "pre_tax_amount": "<number>",
//         "tax_percentage": "<number>",
//         "tax_amount": "<number>",
//         "total_amount": "<number>",
//         "retained_taxes": [
//           {
//             "collected_at": "<dateTime>",
//             "tax": "<string>",
//             "tax_percentage": "<number>",
//             "retained_tax_amount": "<number>"
//           },
//           {
//             "collected_at": "<dateTime>",
//             "tax": "<string>",
//             "tax_percentage": "<number>",
//             "retained_tax_amount": "<number>"
//           }
//         ],
//         "collected_at": "<dateTime>"
//       },
//       {
//         "description": "<string>",
//         "product_identification": "<string>",
//         "quantity": "<integer>",
//         "unit_code": "<string>",
//         "unit_description": "<string>",
//         "unit_amount": "<number>",
//         "pre_tax_amount": "<number>",
//         "tax_percentage": "<number>",
//         "tax_amount": "<number>",
//         "total_amount": "<number>",
//         "retained_taxes": [
//           {
//             "collected_at": "<dateTime>",
//             "tax": "<string>",
//             "tax_percentage": "<number>",
//             "retained_tax_amount": "<number>"
//           },
//           {
//             "collected_at": "<dateTime>",
//             "tax": "<string>",
//             "tax_percentage": "<number>",
//             "retained_tax_amount": "<number>"
//           }
//         ],
//         "collected_at": "<dateTime>"
//       }
//     ],
//     "currency": "<string>",
//     "subtotal_amount": "<number>",
//     "exchange_rate": "<number>",
//     "tax_amount": "<number>",
//     "discount_amount": "<number>",
//     "total_amount": "<number>",
//     "payments": [
//       {
//         "date": "<string>",
//         "payment_type": "<string>",
//         "currency": "<string>",
//         "exchange_rate": "<string>",
//         "amount": "<float>",
//         "operation_number": "<string>",
//         "beneficiary_rfc": "<string>",
//         "beneficiary_account_number": "<string>",
//         "payer_rfc": "<string>",
//         "payer_account_number": "<string>",
//         "payer_bank_name": "<string>",
//         "related_documents": [
//           {
//             "invoice_identification": "<string>",
//             "currency": "<string>",
//             "payment_method": "<string>",
//             "partiality_number": "<integer>",
//             "previous_balance": "<float>",
//             "amount_paid": "<float>",
//             "outstanding_balance": "<float>"
//           },
//           {
//             "invoice_identification": "<string>",
//             "currency": "<string>",
//             "payment_method": "<string>",
//             "partiality_number": "<integer>",
//             "previous_balance": "<float>",
//             "amount_paid": "<float>",
//             "outstanding_balance": "<float>"
//           }
//         ]
//       },
//       {
//         "date": "<string>",
//         "payment_type": "<string>",
//         "currency": "<string>",
//         "exchange_rate": "<string>",
//         "amount": "<float>",
//         "operation_number": "<string>",
//         "beneficiary_rfc": "<string>",
//         "beneficiary_account_number": "<string>",
//         "payer_rfc": "<string>",
//         "payer_account_number": "<string>",
//         "payer_bank_name": "<string>",
//         "related_documents": [
//           {
//             "invoice_identification": "<string>",
//             "currency": "<string>",
//             "payment_method": "<string>",
//             "partiality_number": "<integer>",
//             "previous_balance": "<float>",
//             "amount_paid": "<float>",
//             "outstanding_balance": "<float>"
//           },
//           {
//             "invoice_identification": "<string>",
//             "currency": "<string>",
//             "payment_method": "<string>",
//             "partiality_number": "<integer>",
//             "previous_balance": "<float>",
//             "amount_paid": "<float>",
//             "outstanding_balance": "<float>"
//           }
//         ]
//       }
//     ],
//     "payroll": {
//       "days": "<number>",
//       "type": "<string>",
//       "amount": "<number>",
//       "version": "<string>",
//       "date_from": "<date>",
//       "date_to": "<date>",
//       "collected_at": "<dateTime>",
//       "payment_date": "<date>"
//     },
//     "xml": "<string>",
//     "warnings": {
//       "code": "<string>",
//       "message": "<string>"
//     }
//   },
//   {
//     "link": "<string>",
//     "collected_at": "<dateTime>",
//     "invoice_identification": "<string>",
//     "invoice_date": "<date>",
//     "status": "<string>",
//     "invoice_type": "<string>",
//     "type": "non in do qui",
//     "sender_id": "<string>",
//     "sender_name": "<string>",
//     "receiver_id": "<string>",
//     "receiver_name": "<string>",
//     "cancelation_status": "<string>",
//     "cancelation_update_date": "<date>",
//     "certification_date": "<date>",
//     "certification_authority": "<string>",
//     "payment_type": "<string>",
//     "payment_type_description": "<string>",
//     "payment_method": "<string>",
//     "payment_method_description": "<string>",
//     "usage": "<string>",
//     "version": "<string>",
//     "place_of_issue": "<string>",
//     "invoice_details": [
//       {
//         "description": "<string>",
//         "product_identification": "<string>",
//         "quantity": "<integer>",
//         "unit_code": "<string>",
//         "unit_description": "<string>",
//         "unit_amount": "<number>",
//         "pre_tax_amount": "<number>",
//         "tax_percentage": "<number>",
//         "tax_amount": "<number>",
//         "total_amount": "<number>",
//         "retained_taxes": [
//           {
//             "collected_at": "<dateTime>",
//             "tax": "<string>",
//             "tax_percentage": "<number>",
//             "retained_tax_amount": "<number>"
//           },
//           {
//             "collected_at": "<dateTime>",
//             "tax": "<string>",
//             "tax_percentage": "<number>",
//             "retained_tax_amount": "<number>"
//           }
//         ],
//         "collected_at": "<dateTime>"
//       },
//       {
//         "description": "<string>",
//         "product_identification": "<string>",
//         "quantity": "<integer>",
//         "unit_code": "<string>",
//         "unit_description": "<string>",
//         "unit_amount": "<number>",
//         "pre_tax_amount": "<number>",
//         "tax_percentage": "<number>",
//         "tax_amount": "<number>",
//         "total_amount": "<number>",
//         "retained_taxes": [
//           {
//             "collected_at": "<dateTime>",
//             "tax": "<string>",
//             "tax_percentage": "<number>",
//             "retained_tax_amount": "<number>"
//           },
//           {
//             "collected_at": "<dateTime>",
//             "tax": "<string>",
//             "tax_percentage": "<number>",
//             "retained_tax_amount": "<number>"
//           }
//         ],
//         "collected_at": "<dateTime>"
//       }
//     ],
//     "currency": "<string>",
//     "subtotal_amount": "<number>",
//     "exchange_rate": "<number>",
//     "tax_amount": "<number>",
//     "discount_amount": "<number>",
//     "total_amount": "<number>",
//     "payments": [
//       {
//         "date": "<string>",
//         "payment_type": "<string>",
//         "currency": "<string>",
//         "exchange_rate": "<string>",
//         "amount": "<float>",
//         "operation_number": "<string>",
//         "beneficiary_rfc": "<string>",
//         "beneficiary_account_number": "<string>",
//         "payer_rfc": "<string>",
//         "payer_account_number": "<string>",
//         "payer_bank_name": "<string>",
//         "related_documents": [
//           {
//             "invoice_identification": "<string>",
//             "currency": "<string>",
//             "payment_method": "<string>",
//             "partiality_number": "<integer>",
//             "previous_balance": "<float>",
//             "amount_paid": "<float>",
//             "outstanding_balance": "<float>"
//           },
//           {
//             "invoice_identification": "<string>",
//             "currency": "<string>",
//             "payment_method": "<string>",
//             "partiality_number": "<integer>",
//             "previous_balance": "<float>",
//             "amount_paid": "<float>",
//             "outstanding_balance": "<float>"
//           }
//         ]
//       },
//       {
//         "date": "<string>",
//         "payment_type": "<string>",
//         "currency": "<string>",
//         "exchange_rate": "<string>",
//         "amount": "<float>",
//         "operation_number": "<string>",
//         "beneficiary_rfc": "<string>",
//         "beneficiary_account_number": "<string>",
//         "payer_rfc": "<string>",
//         "payer_account_number": "<string>",
//         "payer_bank_name": "<string>",
//         "related_documents": [
//           {
//             "invoice_identification": "<string>",
//             "currency": "<string>",
//             "payment_method": "<string>",
//             "partiality_number": "<integer>",
//             "previous_balance": "<float>",
//             "amount_paid": "<float>",
//             "outstanding_balance": "<float>"
//           },
//           {
//             "invoice_identification": "<string>",
//             "currency": "<string>",
//             "payment_method": "<string>",
//             "partiality_number": "<integer>",
//             "previous_balance": "<float>",
//             "amount_paid": "<float>",
//             "outstanding_balance": "<float>"
//           }
//         ]
//       }
//     ],
//     "payroll": {
//       "days": "<number>",
//       "type": "<string>",
//       "amount": "<number>",
//       "version": "<string>",
//       "date_from": "<date>",
//       "date_to": "<date>",
//       "collected_at": "<dateTime>",
//       "payment_date": "<date>"
//     },
//     "xml": "<string>",
//     "warnings": {
//       "code": "<string>",
//       "message": "<string>"
//     }
//   }
// ]

// Sample code for parsing the JSON response...
// Use this online tool to generate parsing code from sample JSON: {{.https://tools.chilkat.io/jsonParse|||Generate JSON Parsing Code.}}

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

new DtObj Date_from;
new DtObj Date_to;
JsonObject json;
string link;
string collected_at;
string invoice_identification;
string invoice_date;
string status;
string invoice_type;
string v_type;
string sender_id;
string sender_name;
string receiver_id;
string receiver_name;
string cancelation_status;
string cancelation_update_date;
string certification_date;
string certification_authority;
string payment_type;
string payment_type_description;
string payment_method;
string payment_method_description;
string usage;
string version;
string place_of_issue;
string v_currency;
string subtotal_amount;
string exchange_rate;
string tax_amount;
string discount_amount;
string total_amount;
string Days;
string v_Type;
string Amount;
string Version;
string Collected_at;
string Payment_date;
string xml;
string Code;
string Message;
int j;
int count_j;
string description;
string product_identification;
string quantity;
string unit_code;
string unit_description;
string unit_amount;
string pre_tax_amount;
string tax_percentage;
int k;
int count_k;
string tax;
string retained_tax_amount;
string date;
string amount;
string operation_number;
string beneficiary_rfc;
string beneficiary_account_number;
string payer_rfc;
string payer_account_number;
string payer_bank_name;
string partiality_number;
string previous_balance;
string amount_paid;
string outstanding_balance;

int i = 0;
int count_i = jarrResp.Size;
while i < count_i {
    json = jarrResp.ObjectAt(i);
    link = json.StringOf("link");
    collected_at = json.StringOf("collected_at");
    invoice_identification = json.StringOf("invoice_identification");
    invoice_date = json.StringOf("invoice_date");
    status = json.StringOf("status");
    invoice_type = json.StringOf("invoice_type");
    v_type = json.StringOf("type");
    sender_id = json.StringOf("sender_id");
    sender_name = json.StringOf("sender_name");
    receiver_id = json.StringOf("receiver_id");
    receiver_name = json.StringOf("receiver_name");
    cancelation_status = json.StringOf("cancelation_status");
    cancelation_update_date = json.StringOf("cancelation_update_date");
    certification_date = json.StringOf("certification_date");
    certification_authority = json.StringOf("certification_authority");
    payment_type = json.StringOf("payment_type");
    payment_type_description = json.StringOf("payment_type_description");
    payment_method = json.StringOf("payment_method");
    payment_method_description = json.StringOf("payment_method_description");
    usage = json.StringOf("usage");
    version = json.StringOf("version");
    place_of_issue = json.StringOf("place_of_issue");
    v_currency = json.StringOf("currency");
    subtotal_amount = json.StringOf("subtotal_amount");
    exchange_rate = json.StringOf("exchange_rate");
    tax_amount = json.StringOf("tax_amount");
    discount_amount = json.StringOf("discount_amount");
    total_amount = json.StringOf("total_amount");
    Days = json.StringOf("payroll.days");
    v_Type = json.StringOf("payroll.type");
    Amount = json.StringOf("payroll.amount");
    Version = json.StringOf("payroll.version");
    ignore = json.DtOf("payroll.date_from",ckfalse,Date_from);
    ignore = json.DtOf("payroll.date_to",ckfalse,Date_to);
    Collected_at = json.StringOf("payroll.collected_at");
    Payment_date = json.StringOf("payroll.payment_date");
    xml = json.StringOf("xml");
    Code = json.StringOf("warnings.code");
    Message = json.StringOf("warnings.message");
    j = 0;
    count_j = json.SizeOfArray("invoice_details");
    while j < count_j {
        json.J = j;
        description = json.StringOf("invoice_details[j].description");
        product_identification = json.StringOf("invoice_details[j].product_identification");
        quantity = json.StringOf("invoice_details[j].quantity");
        unit_code = json.StringOf("invoice_details[j].unit_code");
        unit_description = json.StringOf("invoice_details[j].unit_description");
        unit_amount = json.StringOf("invoice_details[j].unit_amount");
        pre_tax_amount = json.StringOf("invoice_details[j].pre_tax_amount");
        tax_percentage = json.StringOf("invoice_details[j].tax_percentage");
        tax_amount = json.StringOf("invoice_details[j].tax_amount");
        total_amount = json.StringOf("invoice_details[j].total_amount");
        collected_at = json.StringOf("invoice_details[j].collected_at");
        k = 0;
        count_k = json.SizeOfArray("invoice_details[j].retained_taxes");
        while k < count_k {
            json.K = k;
            collected_at = json.StringOf("invoice_details[j].retained_taxes[k].collected_at");
            tax = json.StringOf("invoice_details[j].retained_taxes[k].tax");
            tax_percentage = json.StringOf("invoice_details[j].retained_taxes[k].tax_percentage");
            retained_tax_amount = json.StringOf("invoice_details[j].retained_taxes[k].retained_tax_amount");
            k = k + 1;
        }
        j = j + 1;
    }
    j = 0;
    count_j = json.SizeOfArray("payments");
    while j < count_j {
        json.J = j;
        date = json.StringOf("payments[j].date");
        payment_type = json.StringOf("payments[j].payment_type");
        v_currency = json.StringOf("payments[j].currency");
        exchange_rate = json.StringOf("payments[j].exchange_rate");
        amount = json.StringOf("payments[j].amount");
        operation_number = json.StringOf("payments[j].operation_number");
        beneficiary_rfc = json.StringOf("payments[j].beneficiary_rfc");
        beneficiary_account_number = json.StringOf("payments[j].beneficiary_account_number");
        payer_rfc = json.StringOf("payments[j].payer_rfc");
        payer_account_number = json.StringOf("payments[j].payer_account_number");
        payer_bank_name = json.StringOf("payments[j].payer_bank_name");
        k = 0;
        count_k = json.SizeOfArray("payments[j].related_documents");
        while k < count_k {
            json.K = k;
            invoice_identification = json.StringOf("payments[j].related_documents[k].invoice_identification");
            v_currency = json.StringOf("payments[j].related_documents[k].currency");
            payment_method = json.StringOf("payments[j].related_documents[k].payment_method");
            partiality_number = json.StringOf("payments[j].related_documents[k].partiality_number");
            previous_balance = json.StringOf("payments[j].related_documents[k].previous_balance");
            amount_paid = json.StringOf("payments[j].related_documents[k].amount_paid");
            outstanding_balance = json.StringOf("payments[j].related_documents[k].outstanding_balance");
            k = k + 1;
        }
        j = j + 1;
    }
    delete json;
    i = i + 1;
}



---- end chilkat script ----

delphiDll / Belvo API Docs / Retrieve

Back to Collection Items

var
http: HCkHttp;
success: Boolean;
json: HCkJsonObject;
resp: HCkHttpResponse;
sbResponseBody: HCkStringBuilder;
jarrResp: HCkJsonArray;
respStatusCode: Integer;
Date_from: HCkDtObj;
Date_to: HCkDtObj;
json: HCkJsonObject;
link: PWideChar;
collected_at: PWideChar;
invoice_identification: PWideChar;
invoice_date: PWideChar;
status: PWideChar;
invoice_type: PWideChar;
v_type: PWideChar;
sender_id: PWideChar;
sender_name: PWideChar;
receiver_id: PWideChar;
receiver_name: PWideChar;
cancelation_status: PWideChar;
cancelation_update_date: PWideChar;
certification_date: PWideChar;
certification_authority: PWideChar;
payment_type: PWideChar;
payment_type_description: PWideChar;
payment_method: PWideChar;
payment_method_description: PWideChar;
usage: PWideChar;
version: PWideChar;
place_of_issue: PWideChar;
v_currency: PWideChar;
subtotal_amount: PWideChar;
exchange_rate: PWideChar;
tax_amount: PWideChar;
discount_amount: PWideChar;
total_amount: PWideChar;
Days: PWideChar;
v_Type: PWideChar;
Amount: PWideChar;
Version: PWideChar;
Collected_at: PWideChar;
Payment_date: PWideChar;
xml: PWideChar;
Code: PWideChar;
Message: PWideChar;
j: Integer;
count_j: Integer;
description: PWideChar;
product_identification: PWideChar;
quantity: PWideChar;
unit_code: PWideChar;
unit_description: PWideChar;
unit_amount: PWideChar;
pre_tax_amount: PWideChar;
tax_percentage: PWideChar;
k: Integer;
count_k: Integer;
tax: PWideChar;
retained_tax_amount: PWideChar;
date: PWideChar;
amount: PWideChar;
operation_number: PWideChar;
beneficiary_rfc: PWideChar;
beneficiary_account_number: PWideChar;
payer_rfc: PWideChar;
payer_account_number: PWideChar;
payer_bank_name: PWideChar;
partiality_number: PWideChar;
previous_balance: PWideChar;
amount_paid: PWideChar;
outstanding_balance: PWideChar;
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 := CkHttp_Create();

CkHttp_putBasicAuth(http,True);
CkHttp_putLogin(http,'{{secretId}}');
CkHttp_putPassword(http,'{{secretPassword}}');

// Use this online tool to generate code from sample JSON: Generate Code to Create JSON

// The following JSON is sent in the request body.

// {
//   "date_from": "2020-01-01",
//   "date_to": "2020-02-01",
//   "link": "d4617561-1c01-4b2f-83b6-a594f7b3bc57",
//   "type": "OUTFLOW",
//   "attach_xml": false,
//   "save_data": true
// }

json := CkJsonObject_Create();
CkJsonObject_UpdateString(json,'date_from','2020-01-01');
CkJsonObject_UpdateString(json,'date_to','2020-02-01');
CkJsonObject_UpdateString(json,'link','d4617561-1c01-4b2f-83b6-a594f7b3bc57');
CkJsonObject_UpdateString(json,'type','OUTFLOW');
CkJsonObject_UpdateBool(json,'attach_xml',False);
CkJsonObject_UpdateBool(json,'save_data',True);

CkHttp_SetRequestHeader(http,'Content-Type','application/json');

resp := CkHttp_PostJson3(http,'https://domain.com/api/invoices/','application/json',json);
if (CkHttp_getLastMethodSuccess(http) = False) then
  begin
    Memo1.Lines.Add(CkHttp__lastErrorText(http));
    Exit;
  end;

sbResponseBody := CkStringBuilder_Create();
CkHttpResponse_GetBodySb(resp,sbResponseBody);

jarrResp := CkJsonArray_Create();
CkJsonArray_LoadSb(jarrResp,sbResponseBody);
CkJsonArray_putEmitCompact(jarrResp,False);

Memo1.Lines.Add('Response Body:');
Memo1.Lines.Add(CkJsonArray__emit(jarrResp));

respStatusCode := CkHttpResponse_getStatusCode(resp);
Memo1.Lines.Add('Response Status Code = ' + IntToStr(respStatusCode));
if (respStatusCode >= 400) then
  begin
    Memo1.Lines.Add('Response Header:');
    Memo1.Lines.Add(CkHttpResponse__header(resp));
    Memo1.Lines.Add('Failed.');
    CkHttpResponse_Dispose(resp);
    Exit;
  end;
CkHttpResponse_Dispose(resp);

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

// [
//   {
//     "link": "<string>",
//     "collected_at": "<dateTime>",
//     "invoice_identification": "<string>",
//     "invoice_date": "<date>",
//     "status": "<string>",
//     "invoice_type": "<string>",
//     "type": "incididunt exercitation anim dolore",
//     "sender_id": "<string>",
//     "sender_name": "<string>",
//     "receiver_id": "<string>",
//     "receiver_name": "<string>",
//     "cancelation_status": "<string>",
//     "cancelation_update_date": "<date>",
//     "certification_date": "<date>",
//     "certification_authority": "<string>",
//     "payment_type": "<string>",
//     "payment_type_description": "<string>",
//     "payment_method": "<string>",
//     "payment_method_description": "<string>",
//     "usage": "<string>",
//     "version": "<string>",
//     "place_of_issue": "<string>",
//     "invoice_details": [
//       {
//         "description": "<string>",
//         "product_identification": "<string>",
//         "quantity": "<integer>",
//         "unit_code": "<string>",
//         "unit_description": "<string>",
//         "unit_amount": "<number>",
//         "pre_tax_amount": "<number>",
//         "tax_percentage": "<number>",
//         "tax_amount": "<number>",
//         "total_amount": "<number>",
//         "retained_taxes": [
//           {
//             "collected_at": "<dateTime>",
//             "tax": "<string>",
//             "tax_percentage": "<number>",
//             "retained_tax_amount": "<number>"
//           },
//           {
//             "collected_at": "<dateTime>",
//             "tax": "<string>",
//             "tax_percentage": "<number>",
//             "retained_tax_amount": "<number>"
//           }
//         ],
//         "collected_at": "<dateTime>"
//       },
//       {
//         "description": "<string>",
//         "product_identification": "<string>",
//         "quantity": "<integer>",
//         "unit_code": "<string>",
//         "unit_description": "<string>",
//         "unit_amount": "<number>",
//         "pre_tax_amount": "<number>",
//         "tax_percentage": "<number>",
//         "tax_amount": "<number>",
//         "total_amount": "<number>",
//         "retained_taxes": [
//           {
//             "collected_at": "<dateTime>",
//             "tax": "<string>",
//             "tax_percentage": "<number>",
//             "retained_tax_amount": "<number>"
//           },
//           {
//             "collected_at": "<dateTime>",
//             "tax": "<string>",
//             "tax_percentage": "<number>",
//             "retained_tax_amount": "<number>"
//           }
//         ],
//         "collected_at": "<dateTime>"
//       }
//     ],
//     "currency": "<string>",
//     "subtotal_amount": "<number>",
//     "exchange_rate": "<number>",
//     "tax_amount": "<number>",
//     "discount_amount": "<number>",
//     "total_amount": "<number>",
//     "payments": [
//       {
//         "date": "<string>",
//         "payment_type": "<string>",
//         "currency": "<string>",
//         "exchange_rate": "<string>",
//         "amount": "<float>",
//         "operation_number": "<string>",
//         "beneficiary_rfc": "<string>",
//         "beneficiary_account_number": "<string>",
//         "payer_rfc": "<string>",
//         "payer_account_number": "<string>",
//         "payer_bank_name": "<string>",
//         "related_documents": [
//           {
//             "invoice_identification": "<string>",
//             "currency": "<string>",
//             "payment_method": "<string>",
//             "partiality_number": "<integer>",
//             "previous_balance": "<float>",
//             "amount_paid": "<float>",
//             "outstanding_balance": "<float>"
//           },
//           {
//             "invoice_identification": "<string>",
//             "currency": "<string>",
//             "payment_method": "<string>",
//             "partiality_number": "<integer>",
//             "previous_balance": "<float>",
//             "amount_paid": "<float>",
//             "outstanding_balance": "<float>"
//           }
//         ]
//       },
//       {
//         "date": "<string>",
//         "payment_type": "<string>",
//         "currency": "<string>",
//         "exchange_rate": "<string>",
//         "amount": "<float>",
//         "operation_number": "<string>",
//         "beneficiary_rfc": "<string>",
//         "beneficiary_account_number": "<string>",
//         "payer_rfc": "<string>",
//         "payer_account_number": "<string>",
//         "payer_bank_name": "<string>",
//         "related_documents": [
//           {
//             "invoice_identification": "<string>",
//             "currency": "<string>",
//             "payment_method": "<string>",
//             "partiality_number": "<integer>",
//             "previous_balance": "<float>",
//             "amount_paid": "<float>",
//             "outstanding_balance": "<float>"
//           },
//           {
//             "invoice_identification": "<string>",
//             "currency": "<string>",
//             "payment_method": "<string>",
//             "partiality_number": "<integer>",
//             "previous_balance": "<float>",
//             "amount_paid": "<float>",
//             "outstanding_balance": "<float>"
//           }
//         ]
//       }
//     ],
//     "payroll": {
//       "days": "<number>",
//       "type": "<string>",
//       "amount": "<number>",
//       "version": "<string>",
//       "date_from": "<date>",
//       "date_to": "<date>",
//       "collected_at": "<dateTime>",
//       "payment_date": "<date>"
//     },
//     "xml": "<string>",
//     "warnings": {
//       "code": "<string>",
//       "message": "<string>"
//     }
//   },
//   {
//     "link": "<string>",
//     "collected_at": "<dateTime>",
//     "invoice_identification": "<string>",
//     "invoice_date": "<date>",
//     "status": "<string>",
//     "invoice_type": "<string>",
//     "type": "non in do qui",
//     "sender_id": "<string>",
//     "sender_name": "<string>",
//     "receiver_id": "<string>",
//     "receiver_name": "<string>",
//     "cancelation_status": "<string>",
//     "cancelation_update_date": "<date>",
//     "certification_date": "<date>",
//     "certification_authority": "<string>",
//     "payment_type": "<string>",
//     "payment_type_description": "<string>",
//     "payment_method": "<string>",
//     "payment_method_description": "<string>",
//     "usage": "<string>",
//     "version": "<string>",
//     "place_of_issue": "<string>",
//     "invoice_details": [
//       {
//         "description": "<string>",
//         "product_identification": "<string>",
//         "quantity": "<integer>",
//         "unit_code": "<string>",
//         "unit_description": "<string>",
//         "unit_amount": "<number>",
//         "pre_tax_amount": "<number>",
//         "tax_percentage": "<number>",
//         "tax_amount": "<number>",
//         "total_amount": "<number>",
//         "retained_taxes": [
//           {
//             "collected_at": "<dateTime>",
//             "tax": "<string>",
//             "tax_percentage": "<number>",
//             "retained_tax_amount": "<number>"
//           },
//           {
//             "collected_at": "<dateTime>",
//             "tax": "<string>",
//             "tax_percentage": "<number>",
//             "retained_tax_amount": "<number>"
//           }
//         ],
//         "collected_at": "<dateTime>"
//       },
//       {
//         "description": "<string>",
//         "product_identification": "<string>",
//         "quantity": "<integer>",
//         "unit_code": "<string>",
//         "unit_description": "<string>",
//         "unit_amount": "<number>",
//         "pre_tax_amount": "<number>",
//         "tax_percentage": "<number>",
//         "tax_amount": "<number>",
//         "total_amount": "<number>",
//         "retained_taxes": [
//           {
//             "collected_at": "<dateTime>",
//             "tax": "<string>",
//             "tax_percentage": "<number>",
//             "retained_tax_amount": "<number>"
//           },
//           {
//             "collected_at": "<dateTime>",
//             "tax": "<string>",
//             "tax_percentage": "<number>",
//             "retained_tax_amount": "<number>"
//           }
//         ],
//         "collected_at": "<dateTime>"
//       }
//     ],
//     "currency": "<string>",
//     "subtotal_amount": "<number>",
//     "exchange_rate": "<number>",
//     "tax_amount": "<number>",
//     "discount_amount": "<number>",
//     "total_amount": "<number>",
//     "payments": [
//       {
//         "date": "<string>",
//         "payment_type": "<string>",
//         "currency": "<string>",
//         "exchange_rate": "<string>",
//         "amount": "<float>",
//         "operation_number": "<string>",
//         "beneficiary_rfc": "<string>",
//         "beneficiary_account_number": "<string>",
//         "payer_rfc": "<string>",
//         "payer_account_number": "<string>",
//         "payer_bank_name": "<string>",
//         "related_documents": [
//           {
//             "invoice_identification": "<string>",
//             "currency": "<string>",
//             "payment_method": "<string>",
//             "partiality_number": "<integer>",
//             "previous_balance": "<float>",
//             "amount_paid": "<float>",
//             "outstanding_balance": "<float>"
//           },
//           {
//             "invoice_identification": "<string>",
//             "currency": "<string>",
//             "payment_method": "<string>",
//             "partiality_number": "<integer>",
//             "previous_balance": "<float>",
//             "amount_paid": "<float>",
//             "outstanding_balance": "<float>"
//           }
//         ]
//       },
//       {
//         "date": "<string>",
//         "payment_type": "<string>",
//         "currency": "<string>",
//         "exchange_rate": "<string>",
//         "amount": "<float>",
//         "operation_number": "<string>",
//         "beneficiary_rfc": "<string>",
//         "beneficiary_account_number": "<string>",
//         "payer_rfc": "<string>",
//         "payer_account_number": "<string>",
//         "payer_bank_name": "<string>",
//         "related_documents": [
//           {
//             "invoice_identification": "<string>",
//             "currency": "<string>",
//             "payment_method": "<string>",
//             "partiality_number": "<integer>",
//             "previous_balance": "<float>",
//             "amount_paid": "<float>",
//             "outstanding_balance": "<float>"
//           },
//           {
//             "invoice_identification": "<string>",
//             "currency": "<string>",
//             "payment_method": "<string>",
//             "partiality_number": "<integer>",
//             "previous_balance": "<float>",
//             "amount_paid": "<float>",
//             "outstanding_balance": "<float>"
//           }
//         ]
//       }
//     ],
//     "payroll": {
//       "days": "<number>",
//       "type": "<string>",
//       "amount": "<number>",
//       "version": "<string>",
//       "date_from": "<date>",
//       "date_to": "<date>",
//       "collected_at": "<dateTime>",
//       "payment_date": "<date>"
//     },
//     "xml": "<string>",
//     "warnings": {
//       "code": "<string>",
//       "message": "<string>"
//     }
//   }
// ]

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

Date_from := CkDtObj_Create();
Date_to := CkDtObj_Create();
ERROR: Var already declared: json

i := 0;
count_i := CkJsonArray_getSize(jarrResp);
while i < count_i do
  begin
    json := CkJsonArray_ObjectAt(jarrResp,i);
    link := CkJsonObject__stringOf(json,'link');
    collected_at := CkJsonObject__stringOf(json,'collected_at');
    invoice_identification := CkJsonObject__stringOf(json,'invoice_identification');
    invoice_date := CkJsonObject__stringOf(json,'invoice_date');
    status := CkJsonObject__stringOf(json,'status');
    invoice_type := CkJsonObject__stringOf(json,'invoice_type');
    v_type := CkJsonObject__stringOf(json,'type');
    sender_id := CkJsonObject__stringOf(json,'sender_id');
    sender_name := CkJsonObject__stringOf(json,'sender_name');
    receiver_id := CkJsonObject__stringOf(json,'receiver_id');
    receiver_name := CkJsonObject__stringOf(json,'receiver_name');
    cancelation_status := CkJsonObject__stringOf(json,'cancelation_status');
    cancelation_update_date := CkJsonObject__stringOf(json,'cancelation_update_date');
    certification_date := CkJsonObject__stringOf(json,'certification_date');
    certification_authority := CkJsonObject__stringOf(json,'certification_authority');
    payment_type := CkJsonObject__stringOf(json,'payment_type');
    payment_type_description := CkJsonObject__stringOf(json,'payment_type_description');
    payment_method := CkJsonObject__stringOf(json,'payment_method');
    payment_method_description := CkJsonObject__stringOf(json,'payment_method_description');
    usage := CkJsonObject__stringOf(json,'usage');
    version := CkJsonObject__stringOf(json,'version');
    place_of_issue := CkJsonObject__stringOf(json,'place_of_issue');
    v_currency := CkJsonObject__stringOf(json,'currency');
    subtotal_amount := CkJsonObject__stringOf(json,'subtotal_amount');
    exchange_rate := CkJsonObject__stringOf(json,'exchange_rate');
    tax_amount := CkJsonObject__stringOf(json,'tax_amount');
    discount_amount := CkJsonObject__stringOf(json,'discount_amount');
    total_amount := CkJsonObject__stringOf(json,'total_amount');
    Days := CkJsonObject__stringOf(json,'payroll.days');
    v_Type := CkJsonObject__stringOf(json,'payroll.type');
    Amount := CkJsonObject__stringOf(json,'payroll.amount');
    Version := CkJsonObject__stringOf(json,'payroll.version');
    CkJsonObject_DtOf(json,'payroll.date_from',False,Date_from);
    CkJsonObject_DtOf(json,'payroll.date_to',False,Date_to);
    Collected_at := CkJsonObject__stringOf(json,'payroll.collected_at');
    Payment_date := CkJsonObject__stringOf(json,'payroll.payment_date');
    xml := CkJsonObject__stringOf(json,'xml');
    Code := CkJsonObject__stringOf(json,'warnings.code');
    Message := CkJsonObject__stringOf(json,'warnings.message');
    j := 0;
    count_j := CkJsonObject_SizeOfArray(json,'invoice_details');
    while j < count_j do
      begin
        CkJsonObject_putJ(json,j);
        description := CkJsonObject__stringOf(json,'invoice_details[j].description');
        product_identification := CkJsonObject__stringOf(json,'invoice_details[j].product_identification');
        quantity := CkJsonObject__stringOf(json,'invoice_details[j].quantity');
        unit_code := CkJsonObject__stringOf(json,'invoice_details[j].unit_code');
        unit_description := CkJsonObject__stringOf(json,'invoice_details[j].unit_description');
        unit_amount := CkJsonObject__stringOf(json,'invoice_details[j].unit_amount');
        pre_tax_amount := CkJsonObject__stringOf(json,'invoice_details[j].pre_tax_amount');
        tax_percentage := CkJsonObject__stringOf(json,'invoice_details[j].tax_percentage');
        tax_amount := CkJsonObject__stringOf(json,'invoice_details[j].tax_amount');
        total_amount := CkJsonObject__stringOf(json,'invoice_details[j].total_amount');
        collected_at := CkJsonObject__stringOf(json,'invoice_details[j].collected_at');
        k := 0;
        count_k := CkJsonObject_SizeOfArray(json,'invoice_details[j].retained_taxes');
        while k < count_k do
          begin
            CkJsonObject_putK(json,k);
            collected_at := CkJsonObject__stringOf(json,'invoice_details[j].retained_taxes[k].collected_at');
            tax := CkJsonObject__stringOf(json,'invoice_details[j].retained_taxes[k].tax');
            tax_percentage := CkJsonObject__stringOf(json,'invoice_details[j].retained_taxes[k].tax_percentage');
            retained_tax_amount := CkJsonObject__stringOf(json,'invoice_details[j].retained_taxes[k].retained_tax_amount');
            k := k + 1;
          end;

        j := j + 1;
      end;

    j := 0;
    count_j := CkJsonObject_SizeOfArray(json,'payments');
    while j < count_j do
      begin
        CkJsonObject_putJ(json,j);
        date := CkJsonObject__stringOf(json,'payments[j].date');
        payment_type := CkJsonObject__stringOf(json,'payments[j].payment_type');
        v_currency := CkJsonObject__stringOf(json,'payments[j].currency');
        exchange_rate := CkJsonObject__stringOf(json,'payments[j].exchange_rate');
        amount := CkJsonObject__stringOf(json,'payments[j].amount');
        operation_number := CkJsonObject__stringOf(json,'payments[j].operation_number');
        beneficiary_rfc := CkJsonObject__stringOf(json,'payments[j].beneficiary_rfc');
        beneficiary_account_number := CkJsonObject__stringOf(json,'payments[j].beneficiary_account_number');
        payer_rfc := CkJsonObject__stringOf(json,'payments[j].payer_rfc');
        payer_account_number := CkJsonObject__stringOf(json,'payments[j].payer_account_number');
        payer_bank_name := CkJsonObject__stringOf(json,'payments[j].payer_bank_name');
        k := 0;
        count_k := CkJsonObject_SizeOfArray(json,'payments[j].related_documents');
        while k < count_k do
          begin
            CkJsonObject_putK(json,k);
            invoice_identification := CkJsonObject__stringOf(json,'payments[j].related_documents[k].invoice_identification');
            v_currency := CkJsonObject__stringOf(json,'payments[j].related_documents[k].currency');
            payment_method := CkJsonObject__stringOf(json,'payments[j].related_documents[k].payment_method');
            partiality_number := CkJsonObject__stringOf(json,'payments[j].related_documents[k].partiality_number');
            previous_balance := CkJsonObject__stringOf(json,'payments[j].related_documents[k].previous_balance');
            amount_paid := CkJsonObject__stringOf(json,'payments[j].related_documents[k].amount_paid');
            outstanding_balance := CkJsonObject__stringOf(json,'payments[j].related_documents[k].outstanding_balance');
            k := k + 1;
          end;

        j := j + 1;
      end;

    CkJsonObject_Dispose(json);
    i := i + 1;
  end;

CkHttp_Dispose(http);
CkJsonObject_Dispose(json);
CkStringBuilder_Dispose(sbResponseBody);
CkJsonArray_Dispose(jarrResp);
CkDtObj_Dispose(Date_from);
CkDtObj_Dispose(Date_to);

Curl Command

curl -X POST
	-u '{{secretId}}:{{secretPassword}}'
	-H "Content-Type: application/json"
	-d '{
    "date_from": "2020-01-01",
    "date_to": "2020-02-01",
    "link": "d4617561-1c01-4b2f-83b6-a594f7b3bc57",
    "type": "OUTFLOW",
    "attach_xml": false,
    "save_data": true
}'
https://domain.com/api/invoices/

Postman Collection Item JSON

{
  "name": "Retrieve",
  "request": {
    "method": "POST",
    "header": [
      {
        "key": "Content-Type",
        "value": "application/json"
      }
    ],
    "body": {
      "mode": "raw",
      "raw": "{\n    \"date_from\": \"2020-01-01\",\n    \"date_to\": \"2020-02-01\",\n    \"link\": \"d4617561-1c01-4b2f-83b6-a594f7b3bc57\",\n    \"type\": \"OUTFLOW\",\n    \"attach_xml\": false,\n    \"save_data\": true\n}"
    },
    "url": {
      "raw": "{{baseUrl}}/api/invoices/",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "api",
        "invoices",
        ""
      ]
    },
    "description": "Retrieve invoice information from a specific fiscal link.\n\nℹ️ You can ask for up to **one** year (365 days) of invoices per request. If you need invoices for more than one year, just make another request.\n"
  },
  "response": [
    {
      "name": "Ok (when save_data=false)",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "description": "Added as a part of security scheme: basic",
            "key": "Authorization",
            "value": "Basic <credentials>"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n    \"date_from\": \"<date>\",\n    \"date_to\": \"<date>\",\n    \"link\": \"<uuid>\",\n    \"type\": \"<string>\",\n    \"attach_xml\": false,\n    \"encryption_key\": \"<string>\",\n    \"save_data\": true\n}"
        },
        "url": {
          "raw": "{{baseUrl}}/api/invoices",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "invoices"
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "[\n\t{\n\t\t\"link\": \"<string>\",\n\t\t\"collected_at\": \"<dateTime>\",\n\t\t\"invoice_identification\": \"<string>\",\n\t\t\"invoice_date\": \"<date>\",\n\t\t\"status\": \"<string>\",\n\t\t\"invoice_type\": \"<string>\",\n\t\t\"type\": \"incididunt exercitation anim dolore\",\n\t\t\"sender_id\": \"<string>\",\n\t\t\"sender_name\": \"<string>\",\n\t\t\"receiver_id\": \"<string>\",\n\t\t\"receiver_name\": \"<string>\",\n\t\t\"cancelation_status\": \"<string>\",\n\t\t\"cancelation_update_date\": \"<date>\",\n\t\t\"certification_date\": \"<date>\",\n\t\t\"certification_authority\": \"<string>\",\n\t\t\"payment_type\": \"<string>\",\n\t\t\"payment_type_description\": \"<string>\",\n\t\t\"payment_method\": \"<string>\",\n\t\t\"payment_method_description\": \"<string>\",\n\t\t\"usage\": \"<string>\",\n\t\t\"version\": \"<string>\",\n\t\t\"place_of_issue\": \"<string>\",\n\t\t\"invoice_details\": [\n\t\t\t{\n\t\t\t\t\"description\": \"<string>\",\n\t\t\t\t\"product_identification\": \"<string>\",\n\t\t\t\t\"quantity\": \"<integer>\",\n\t\t\t\t\"unit_code\": \"<string>\",\n\t\t\t\t\"unit_description\": \"<string>\",\n\t\t\t\t\"unit_amount\": \"<number>\",\n\t\t\t\t\"pre_tax_amount\": \"<number>\",\n\t\t\t\t\"tax_percentage\": \"<number>\",\n\t\t\t\t\"tax_amount\": \"<number>\",\n\t\t\t\t\"total_amount\": \"<number>\",\n\t\t\t\t\"retained_taxes\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"collected_at\": \"<dateTime>\",\n\t\t\t\t\t\t\"tax\": \"<string>\",\n\t\t\t\t\t\t\"tax_percentage\": \"<number>\",\n\t\t\t\t\t\t\"retained_tax_amount\": \"<number>\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"collected_at\": \"<dateTime>\",\n\t\t\t\t\t\t\"tax\": \"<string>\",\n\t\t\t\t\t\t\"tax_percentage\": \"<number>\",\n\t\t\t\t\t\t\"retained_tax_amount\": \"<number>\"\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"collected_at\": \"<dateTime>\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"description\": \"<string>\",\n\t\t\t\t\"product_identification\": \"<string>\",\n\t\t\t\t\"quantity\": \"<integer>\",\n\t\t\t\t\"unit_code\": \"<string>\",\n\t\t\t\t\"unit_description\": \"<string>\",\n\t\t\t\t\"unit_amount\": \"<number>\",\n\t\t\t\t\"pre_tax_amount\": \"<number>\",\n\t\t\t\t\"tax_percentage\": \"<number>\",\n\t\t\t\t\"tax_amount\": \"<number>\",\n\t\t\t\t\"total_amount\": \"<number>\",\n\t\t\t\t\"retained_taxes\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"collected_at\": \"<dateTime>\",\n\t\t\t\t\t\t\"tax\": \"<string>\",\n\t\t\t\t\t\t\"tax_percentage\": \"<number>\",\n\t\t\t\t\t\t\"retained_tax_amount\": \"<number>\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"collected_at\": \"<dateTime>\",\n\t\t\t\t\t\t\"tax\": \"<string>\",\n\t\t\t\t\t\t\"tax_percentage\": \"<number>\",\n\t\t\t\t\t\t\"retained_tax_amount\": \"<number>\"\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"collected_at\": \"<dateTime>\"\n\t\t\t}\n\t\t],\n\t\t\"currency\": \"<string>\",\n\t\t\"subtotal_amount\": \"<number>\",\n\t\t\"exchange_rate\": \"<number>\",\n\t\t\"tax_amount\": \"<number>\",\n\t\t\"discount_amount\": \"<number>\",\n\t\t\"total_amount\": \"<number>\",\n\t\t\"payments\": [\n\t\t\t{\n\t\t\t\t\"date\": \"<string>\",\n\t\t\t\t\"payment_type\": \"<string>\",\n\t\t\t\t\"currency\": \"<string>\",\n\t\t\t\t\"exchange_rate\": \"<string>\",\n\t\t\t\t\"amount\": \"<float>\",\n\t\t\t\t\"operation_number\": \"<string>\",\n\t\t\t\t\"beneficiary_rfc\": \"<string>\",\n\t\t\t\t\"beneficiary_account_number\": \"<string>\",\n\t\t\t\t\"payer_rfc\": \"<string>\",\n\t\t\t\t\"payer_account_number\": \"<string>\",\n\t\t\t\t\"payer_bank_name\": \"<string>\",\n\t\t\t\t\"related_documents\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"invoice_identification\": \"<string>\",\n\t\t\t\t\t\t\"currency\": \"<string>\",\n\t\t\t\t\t\t\"payment_method\": \"<string>\",\n\t\t\t\t\t\t\"partiality_number\": \"<integer>\",\n\t\t\t\t\t\t\"previous_balance\": \"<float>\",\n\t\t\t\t\t\t\"amount_paid\": \"<float>\",\n\t\t\t\t\t\t\"outstanding_balance\": \"<float>\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"invoice_identification\": \"<string>\",\n\t\t\t\t\t\t\"currency\": \"<string>\",\n\t\t\t\t\t\t\"payment_method\": \"<string>\",\n\t\t\t\t\t\t\"partiality_number\": \"<integer>\",\n\t\t\t\t\t\t\"previous_balance\": \"<float>\",\n\t\t\t\t\t\t\"amount_paid\": \"<float>\",\n\t\t\t\t\t\t\"outstanding_balance\": \"<float>\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"date\": \"<string>\",\n\t\t\t\t\"payment_type\": \"<string>\",\n\t\t\t\t\"currency\": \"<string>\",\n\t\t\t\t\"exchange_rate\": \"<string>\",\n\t\t\t\t\"amount\": \"<float>\",\n\t\t\t\t\"operation_number\": \"<string>\",\n\t\t\t\t\"beneficiary_rfc\": \"<string>\",\n\t\t\t\t\"beneficiary_account_number\": \"<string>\",\n\t\t\t\t\"payer_rfc\": \"<string>\",\n\t\t\t\t\"payer_account_number\": \"<string>\",\n\t\t\t\t\"payer_bank_name\": \"<string>\",\n\t\t\t\t\"related_documents\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"invoice_identification\": \"<string>\",\n\t\t\t\t\t\t\"currency\": \"<string>\",\n\t\t\t\t\t\t\"payment_method\": \"<string>\",\n\t\t\t\t\t\t\"partiality_number\": \"<integer>\",\n\t\t\t\t\t\t\"previous_balance\": \"<float>\",\n\t\t\t\t\t\t\"amount_paid\": \"<float>\",\n\t\t\t\t\t\t\"outstanding_balance\": \"<float>\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"invoice_identification\": \"<string>\",\n\t\t\t\t\t\t\"currency\": \"<string>\",\n\t\t\t\t\t\t\"payment_method\": \"<string>\",\n\t\t\t\t\t\t\"partiality_number\": \"<integer>\",\n\t\t\t\t\t\t\"previous_balance\": \"<float>\",\n\t\t\t\t\t\t\"amount_paid\": \"<float>\",\n\t\t\t\t\t\t\"outstanding_balance\": \"<float>\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t],\n\t\t\"payroll\": {\n\t\t\t\"days\": \"<number>\",\n\t\t\t\"type\": \"<string>\",\n\t\t\t\"amount\": \"<number>\",\n\t\t\t\"version\": \"<string>\",\n\t\t\t\"date_from\": \"<date>\",\n\t\t\t\"date_to\": \"<date>\",\n\t\t\t\"collected_at\": \"<dateTime>\",\n\t\t\t\"payment_date\": \"<date>\"\n\t\t},\n\t\t\"xml\": \"<string>\",\n\t\t\"warnings\": {\n\t\t\t\"code\": \"<string>\",\n\t\t\t\"message\": \"<string>\"\n\t\t}\n\t},\n\t{\n\t\t\"link\": \"<string>\",\n\t\t\"collected_at\": \"<dateTime>\",\n\t\t\"invoice_identification\": \"<string>\",\n\t\t\"invoice_date\": \"<date>\",\n\t\t\"status\": \"<string>\",\n\t\t\"invoice_type\": \"<string>\",\n\t\t\"type\": \"non in do qui\",\n\t\t\"sender_id\": \"<string>\",\n\t\t\"sender_name\": \"<string>\",\n\t\t\"receiver_id\": \"<string>\",\n\t\t\"receiver_name\": \"<string>\",\n\t\t\"cancelation_status\": \"<string>\",\n\t\t\"cancelation_update_date\": \"<date>\",\n\t\t\"certification_date\": \"<date>\",\n\t\t\"certification_authority\": \"<string>\",\n\t\t\"payment_type\": \"<string>\",\n\t\t\"payment_type_description\": \"<string>\",\n\t\t\"payment_method\": \"<string>\",\n\t\t\"payment_method_description\": \"<string>\",\n\t\t\"usage\": \"<string>\",\n\t\t\"version\": \"<string>\",\n\t\t\"place_of_issue\": \"<string>\",\n\t\t\"invoice_details\": [\n\t\t\t{\n\t\t\t\t\"description\": \"<string>\",\n\t\t\t\t\"product_identification\": \"<string>\",\n\t\t\t\t\"quantity\": \"<integer>\",\n\t\t\t\t\"unit_code\": \"<string>\",\n\t\t\t\t\"unit_description\": \"<string>\",\n\t\t\t\t\"unit_amount\": \"<number>\",\n\t\t\t\t\"pre_tax_amount\": \"<number>\",\n\t\t\t\t\"tax_percentage\": \"<number>\",\n\t\t\t\t\"tax_amount\": \"<number>\",\n\t\t\t\t\"total_amount\": \"<number>\",\n\t\t\t\t\"retained_taxes\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"collected_at\": \"<dateTime>\",\n\t\t\t\t\t\t\"tax\": \"<string>\",\n\t\t\t\t\t\t\"tax_percentage\": \"<number>\",\n\t\t\t\t\t\t\"retained_tax_amount\": \"<number>\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"collected_at\": \"<dateTime>\",\n\t\t\t\t\t\t\"tax\": \"<string>\",\n\t\t\t\t\t\t\"tax_percentage\": \"<number>\",\n\t\t\t\t\t\t\"retained_tax_amount\": \"<number>\"\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"collected_at\": \"<dateTime>\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"description\": \"<string>\",\n\t\t\t\t\"product_identification\": \"<string>\",\n\t\t\t\t\"quantity\": \"<integer>\",\n\t\t\t\t\"unit_code\": \"<string>\",\n\t\t\t\t\"unit_description\": \"<string>\",\n\t\t\t\t\"unit_amount\": \"<number>\",\n\t\t\t\t\"pre_tax_amount\": \"<number>\",\n\t\t\t\t\"tax_percentage\": \"<number>\",\n\t\t\t\t\"tax_amount\": \"<number>\",\n\t\t\t\t\"total_amount\": \"<number>\",\n\t\t\t\t\"retained_taxes\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"collected_at\": \"<dateTime>\",\n\t\t\t\t\t\t\"tax\": \"<string>\",\n\t\t\t\t\t\t\"tax_percentage\": \"<number>\",\n\t\t\t\t\t\t\"retained_tax_amount\": \"<number>\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"collected_at\": \"<dateTime>\",\n\t\t\t\t\t\t\"tax\": \"<string>\",\n\t\t\t\t\t\t\"tax_percentage\": \"<number>\",\n\t\t\t\t\t\t\"retained_tax_amount\": \"<number>\"\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"collected_at\": \"<dateTime>\"\n\t\t\t}\n\t\t],\n\t\t\"currency\": \"<string>\",\n\t\t\"subtotal_amount\": \"<number>\",\n\t\t\"exchange_rate\": \"<number>\",\n\t\t\"tax_amount\": \"<number>\",\n\t\t\"discount_amount\": \"<number>\",\n\t\t\"total_amount\": \"<number>\",\n\t\t\"payments\": [\n\t\t\t{\n\t\t\t\t\"date\": \"<string>\",\n\t\t\t\t\"payment_type\": \"<string>\",\n\t\t\t\t\"currency\": \"<string>\",\n\t\t\t\t\"exchange_rate\": \"<string>\",\n\t\t\t\t\"amount\": \"<float>\",\n\t\t\t\t\"operation_number\": \"<string>\",\n\t\t\t\t\"beneficiary_rfc\": \"<string>\",\n\t\t\t\t\"beneficiary_account_number\": \"<string>\",\n\t\t\t\t\"payer_rfc\": \"<string>\",\n\t\t\t\t\"payer_account_number\": \"<string>\",\n\t\t\t\t\"payer_bank_name\": \"<string>\",\n\t\t\t\t\"related_documents\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"invoice_identification\": \"<string>\",\n\t\t\t\t\t\t\"currency\": \"<string>\",\n\t\t\t\t\t\t\"payment_method\": \"<string>\",\n\t\t\t\t\t\t\"partiality_number\": \"<integer>\",\n\t\t\t\t\t\t\"previous_balance\": \"<float>\",\n\t\t\t\t\t\t\"amount_paid\": \"<float>\",\n\t\t\t\t\t\t\"outstanding_balance\": \"<float>\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"invoice_identification\": \"<string>\",\n\t\t\t\t\t\t\"currency\": \"<string>\",\n\t\t\t\t\t\t\"payment_method\": \"<string>\",\n\t\t\t\t\t\t\"partiality_number\": \"<integer>\",\n\t\t\t\t\t\t\"previous_balance\": \"<float>\",\n\t\t\t\t\t\t\"amount_paid\": \"<float>\",\n\t\t\t\t\t\t\"outstanding_balance\": \"<float>\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"date\": \"<string>\",\n\t\t\t\t\"payment_type\": \"<string>\",\n\t\t\t\t\"currency\": \"<string>\",\n\t\t\t\t\"exchange_rate\": \"<string>\",\n\t\t\t\t\"amount\": \"<float>\",\n\t\t\t\t\"operation_number\": \"<string>\",\n\t\t\t\t\"beneficiary_rfc\": \"<string>\",\n\t\t\t\t\"beneficiary_account_number\": \"<string>\",\n\t\t\t\t\"payer_rfc\": \"<string>\",\n\t\t\t\t\"payer_account_number\": \"<string>\",\n\t\t\t\t\"payer_bank_name\": \"<string>\",\n\t\t\t\t\"related_documents\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"invoice_identification\": \"<string>\",\n\t\t\t\t\t\t\"currency\": \"<string>\",\n\t\t\t\t\t\t\"payment_method\": \"<string>\",\n\t\t\t\t\t\t\"partiality_number\": \"<integer>\",\n\t\t\t\t\t\t\"previous_balance\": \"<float>\",\n\t\t\t\t\t\t\"amount_paid\": \"<float>\",\n\t\t\t\t\t\t\"outstanding_balance\": \"<float>\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"invoice_identification\": \"<string>\",\n\t\t\t\t\t\t\"currency\": \"<string>\",\n\t\t\t\t\t\t\"payment_method\": \"<string>\",\n\t\t\t\t\t\t\"partiality_number\": \"<integer>\",\n\t\t\t\t\t\t\"previous_balance\": \"<float>\",\n\t\t\t\t\t\t\"amount_paid\": \"<float>\",\n\t\t\t\t\t\t\"outstanding_balance\": \"<float>\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t],\n\t\t\"payroll\": {\n\t\t\t\"days\": \"<number>\",\n\t\t\t\"type\": \"<string>\",\n\t\t\t\"amount\": \"<number>\",\n\t\t\t\"version\": \"<string>\",\n\t\t\t\"date_from\": \"<date>\",\n\t\t\t\"date_to\": \"<date>\",\n\t\t\t\"collected_at\": \"<dateTime>\",\n\t\t\t\"payment_date\": \"<date>\"\n\t\t},\n\t\t\"xml\": \"<string>\",\n\t\t\"warnings\": {\n\t\t\t\"code\": \"<string>\",\n\t\t\t\"message\": \"<string>\"\n\t\t}\n\t}\n]"
    },
    {
      "name": "Created (when save_data=true)",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "description": "Added as a part of security scheme: basic",
            "key": "Authorization",
            "value": "Basic <credentials>"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n    \"date_from\": \"<date>\",\n    \"date_to\": \"<date>\",\n    \"link\": \"<uuid>\",\n    \"type\": \"<string>\",\n    \"attach_xml\": false,\n    \"encryption_key\": \"<string>\",\n    \"save_data\": true\n}"
        },
        "url": {
          "raw": "{{baseUrl}}/api/invoices",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "invoices"
          ]
        }
      },
      "status": "Created",
      "code": 201,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "[\n\t{\n\t\t\"description\": \"<string>\",\n\t\t\"product_identification\": \"<string>\",\n\t\t\"quantity\": \"<integer>\",\n\t\t\"unit_code\": \"<string>\",\n\t\t\"unit_description\": \"<string>\",\n\t\t\"unit_amount\": \"<number>\",\n\t\t\"pre_tax_amount\": \"<number>\",\n\t\t\"tax_percentage\": \"<number>\",\n\t\t\"tax_amount\": \"<number>\",\n\t\t\"total_amount\": \"<number>\",\n\t\t\"retained_taxes\": [\n\t\t\t{\n\t\t\t\t\"collected_at\": \"<dateTime>\",\n\t\t\t\t\"tax\": \"<string>\",\n\t\t\t\t\"tax_percentage\": \"<number>\",\n\t\t\t\t\"retained_tax_amount\": \"<number>\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"collected_at\": \"<dateTime>\",\n\t\t\t\t\"tax\": \"<string>\",\n\t\t\t\t\"tax_percentage\": \"<number>\",\n\t\t\t\t\"retained_tax_amount\": \"<number>\"\n\t\t\t}\n\t\t],\n\t\t\"collected_at\": \"<dateTime>\"\n\t},\n\t{\n\t\t\"description\": \"<string>\",\n\t\t\"product_identification\": \"<string>\",\n\t\t\"quantity\": \"<integer>\",\n\t\t\"unit_code\": \"<string>\",\n\t\t\"unit_description\": \"<string>\",\n\t\t\"unit_amount\": \"<number>\",\n\t\t\"pre_tax_amount\": \"<number>\",\n\t\t\"tax_percentage\": \"<number>\",\n\t\t\"tax_amount\": \"<number>\",\n\t\t\"total_amount\": \"<number>\",\n\t\t\"retained_taxes\": [\n\t\t\t{\n\t\t\t\t\"collected_at\": \"<dateTime>\",\n\t\t\t\t\"tax\": \"<string>\",\n\t\t\t\t\"tax_percentage\": \"<number>\",\n\t\t\t\t\"retained_tax_amount\": \"<number>\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"collected_at\": \"<dateTime>\",\n\t\t\t\t\"tax\": \"<string>\",\n\t\t\t\t\"tax_percentage\": \"<number>\",\n\t\t\t\t\"retained_tax_amount\": \"<number>\"\n\t\t\t}\n\t\t],\n\t\t\"collected_at\": \"<dateTime>\"\n\t}\n]"
    },
    {
      "name": "Bad request error",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "description": "Added as a part of security scheme: basic",
            "key": "Authorization",
            "value": "Basic <credentials>"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n    \"date_from\": \"<date>\",\n    \"date_to\": \"<date>\",\n    \"link\": \"<uuid>\",\n    \"type\": \"<string>\",\n    \"attach_xml\": false,\n    \"encryption_key\": \"<string>\",\n    \"save_data\": true\n}"
        },
        "url": {
          "raw": "{{baseUrl}}/api/invoices",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "invoices"
          ]
        }
      },
      "status": "Bad Request",
      "code": 400,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "[\n\t{\n\t\t\"code\": \"<string>\",\n\t\t\"message\": \"<string>\",\n\t\t\"request_id\": \"<string>\"\n\t},\n\t{\n\t\t\"code\": \"<string>\",\n\t\t\"message\": \"<string>\",\n\t\t\"request_id\": \"<string>\"\n\t}\n]"
    },
    {
      "name": "Unauthorized",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "description": "Added as a part of security scheme: basic",
            "key": "Authorization",
            "value": "Basic <credentials>"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n    \"date_from\": \"<date>\",\n    \"date_to\": \"<date>\",\n    \"link\": \"<uuid>\",\n    \"type\": \"<string>\",\n    \"attach_xml\": false,\n    \"encryption_key\": \"<string>\",\n    \"save_data\": true\n}"
        },
        "url": {
          "raw": "{{baseUrl}}/api/invoices",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "invoices"
          ]
        }
      },
      "status": "Unauthorized",
      "code": 401,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "[\n\t{\n\t\t\"code\": \"<string>\",\n\t\t\"message\": \"<string>\",\n\t\t\"request_id\": \"<string>\"\n\t},\n\t{\n\t\t\"code\": \"<string>\",\n\t\t\"message\": \"<string>\",\n\t\t\"request_id\": \"<string>\"\n\t}\n]"
    },
    {
      "name": "Request Timeout",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "description": "Added as a part of security scheme: basic",
            "key": "Authorization",
            "value": "Basic <credentials>"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n    \"date_from\": \"<date>\",\n    \"date_to\": \"<date>\",\n    \"link\": \"<uuid>\",\n    \"type\": \"<string>\",\n    \"attach_xml\": false,\n    \"encryption_key\": \"<string>\",\n    \"save_data\": true\n}"
        },
        "url": {
          "raw": "{{baseUrl}}/api/invoices",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "invoices"
          ]
        }
      },
      "status": "Request Timeout",
      "code": 408,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "[\n\t{\n\t\t\"code\": \"<string>\",\n\t\t\"message\": \"<string>\",\n\t\t\"request_id\": \"<string>\"\n\t},\n\t{\n\t\t\"code\": \"<string>\",\n\t\t\"message\": \"<string>\",\n\t\t\"request_id\": \"<string>\"\n\t}\n]"
    },
    {
      "name": "Unexpected Error",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "description": "Added as a part of security scheme: basic",
            "key": "Authorization",
            "value": "Basic <credentials>"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n    \"date_from\": \"<date>\",\n    \"date_to\": \"<date>\",\n    \"link\": \"<uuid>\",\n    \"type\": \"<string>\",\n    \"attach_xml\": false,\n    \"encryption_key\": \"<string>\",\n    \"save_data\": true\n}"
        },
        "url": {
          "raw": "{{baseUrl}}/api/invoices",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "invoices"
          ]
        }
      },
      "status": "Internal Server Error",
      "code": 500,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "[\n\t{\n\t\t\"code\": \"<string>\",\n\t\t\"message\": \"<string>\",\n\t\t\"request_id\": \"<string>\"\n\t},\n\t{\n\t\t\"code\": \"<string>\",\n\t\t\"message\": \"<string>\",\n\t\t\"request_id\": \"<string>\"\n\t}\n]"
    }
  ]
}