Table of Contents

Get invoice list

Returns a list of invoices.

URL

/cnbs/v1/invoices

Method(s)

GET | POST

Parameters

Required

Optional

Example POST

JSON Payload:

{
  "payer_data": {
    "customer_number": "3000",
    "company_code": "3000"
  },
  "soldto_data": {
    "customer_number": "3000",
    "sales_area_data": {
      "sales_organization": "3000",
      "distribution_channel": "10",
      "division": "00"
    }
  },
  "search_parameters": {
    "document_type": "01",
    "status": "01",
    "date_from": "01-01-2017",
    "date_to": "12-31-2017",
    "due_date_from": "",
    "due_date_to": "",
    "currency_key": "",
    "filter": [
      {
        "filter_type": "",
        "value": ""
      }
    ]
  }
}

cURL:

curl -X POST "https://<<your.server.here>>/cnbs/v1/invoices?sap-client=800&sap-language=EN&apiid=CNBSMV01P" -H  "accept: application/json" -H  "content-type: application/json" -H  "cnbssysid: gPuM1VyY1dxlTE2MEs2yajJUkX3/4+2Pw1alRw4BOtI=" -H  "authorization: Basic Q05CU0FQSUlDRjpjbmJzNHlvdTE=" -d "{  \"payer_data\": {    \"customer_number\": \"3000\",    \"company_code\": \"3000\"  },  \"soldto_data\": {    \"customer_number\": \"3000\",    \"sales_area_data\": {      \"sales_organization\": \"3000\",      \"distribution_channel\": \"10\",      \"division\": \"00\"    }  },  \"search_parameters\": {    \"document_type\": \"01\",    \"status\": \"01\",    \"date_from\": \"01-01-2017\",    \"date_to\": \"12-31-2017\",    \"due_date_from\": \"\",    \"due_date_to\": \"\",    \"currency_key\": \"\",    \"filter\": [      {        \"filter_type\": \"\",        \"value\": \"\"      }    ]  }}"

Example GET

cURL:

curl -X GET "https://<<your.server.here>>/cnbs/v1/invoices?sap-client=800&sap-language=EN&apiid=CNBSMV01R&soldto_number=3000&sales_organization=3000&distribution_channel=10&division=00&payer_number=3050&company_code=3000&document_type=01&document_search_status=01&date_from=01-01-2017&date_to=12-31-2099" -H  "accept: application/json" -H  "content-type: application/json" -H  "cnbssysid: gPuM1VyY1dxlTE2MEs2yajJUkX3/4+2Pw1alRw4BOtI="

Response

The response consists of a document list table (document_list) and a status (status).

Example Response

JSON:

{
  "document_list": [
    {
      "billing_document_number": "90038990",
      "billing_document_type": "F2",
      "sales_organization": "3000",
      "distribution_channel": "10",
      "division": "00",
      "document_number_finance": "1400000229",
      "line_item_in_the_relevant_invoice": 1,
      "finance_document_type": "RV",
      "reference_number": "90038990",
      "fiscal_year_of_the_relevant invoice": 2016,
      "soldto_number": "3000",
      "payer_number": "3050",
      "posting_date": "04-30-2016",
      "document_date": "04-12-2016",
      "due_date": "05-31-2016",
      "days_in_arrears": "157",
      "currency_key": "USD",
      "total_amount": 1000,
      "open_amount": 900,
      "paid_amount": 100,
      "discount_amount": 0,
      "pdf_document_available": "X"
    }
  ],
  "status": {
    "message_type": "S",
    "message_identification": "/CNBS/X_API",
    "message_number": 10,
    "message_line_string": "Request successfully processed ,document selected 1"
  }
}