Get invoice detail
Return invoice details.
URL
/cnbs/v1/invoices/id
Method(s)
GET | POST
Parameters
Required
- Document Detail (document_detail)
- Billing Document Number (billing_document_number)
- Billing document number to be selected.
- API Document type (document_type)
- Standard Document Types:
- 01 … Invoice document type
- Custom Document Types:
- 90-99 … Custom document types can be implemented on a project basis and require a implementation in the backend as well.
- Customer Number (customer_number)
Example POST
JSON Payload:
{ "document_detail": { "billing_document_number": "90038990", "document_type": "01", "customer_number": "3000" } }
cURL:
curl -X POST "https://<<your.server.here>>/cnbs/v1/invoices/id?sap-client=800&sap-language=EN&apiid=CNBSMV01P" -H "accept: application/json" -H "content-type: application/json" -H "cnbssysid: gPuM1VyY1dxlTE2MEs2yajJUkX3/4+2Pw1alRw4BOtI=" -d "{ \"document_detail\": { \"billing_document_number\": \"90038990\", \"document_type\": \"01\" }}"
Example GET
cURL:
curl -X GET "https://<<your.server.here>>/cnbs/v1/invoices/id?sap-client=800&sap-language=EN&apiid=CNBSMV01R&billing_document_number=90038990&document_type=01" -H "accept: application/json" -H "content-type: application/json" -H "cnbssysid: gPuM1VyY1dxlTE2MEs2yajJUkX3/4+2Pw1alRw4BOtI="
Response
- Document detail (detail)
- Header Data (header_data)
- Document Number (billing_document_number)
- Contains the billing document number.
- Document Type (billing_document_type)
- Contains the billing document type.
- Sold-To Number (soldto_number)
- Sold-To customer number.
- Sales Organization (sales_organization)
- Distribution Channel (distribution_channel)
- Division (division)
- Company Code (company_code)
- Currency (currency_key)
- Document currency key.
- Document Date (document_date)
- Billing document document date.
- Total Amount (total_amount)
- Total amount of billing document with sign (+/-)
- Document Status (document_status)
- Document status
- 01 = Open
- 02 = Partially cleared
- 03 = Cleared
- 04 = Cancelled
- Debit Credit Flag (debit_credit_flag)
- Debit or Credit flag
- Item Data Table (item_data)
- Item Number (item_number)
- Contains the billing document item number.
- Material Number (material_number)
- Material Number.
- Description (description)
- Material description for material related line items.
- Billed Quantity (billed_quantity)
- Quantity invoiced for this line item.
- Sales Unit (sales_unit)
- Sales Unit of measure.
- Base Unit (base_unit)
- Base Unit of measure.
- Pricing Unit (pricing_unit)
- Price Unit of measure.
- Currency Key (currency_key)
- Currency key.
- Total Amount (total_amount)
- Total amount of line item with sign (+/-).
- Partner Data Table (partner_data)
- Partner Function (partner_function)
- Partner Function, possible responses:
- AG … Sold-To
- RG … Payer
- Partner Number (partner_number)
- Partner Number.
- Address (adress_data)
- Name (name)
- City (city)
- District (district)
- Street (street)
- Postal Code City (postal_code_city)
- Region (region)
- Country (country)
- Status (status)
- Message Type (message_type)
- SAP Message Type.
- Errors:
- E = Error
- A = Abort
- X = Exception
- Others:
- S = Success
- W = Warning
- I = Information
- Message Identification (message_identification)
- SAP Message ID.
- Message Number (message_number)
- SAP Message Number.
- Message Line (message_line_string)
- SAP Message Text.
Example Response
JSON:
{ "detail": { "header_data": { "billing_document_number": "0090038990", "billing_document_type": "F2", "soldto_number": "0000003000", "sales_organization": "3000", "distribution_channel": "10", "division": "00", "company_code": "3000", "currency_key": "USD", "document_date": "07-12-2016", "total_amount": 10, "document_status": "01", "debit_credit_flag": "D" }, "item_data": [ { "item_number": 10, "material_number": "100-300", "description": "Hollow shaft", "billed_quantity": 1, "sales_unit": "ST", "base_unit": "ST", "pricing_unit": "ST", "currency_key": "USD", "total_amount": 10 } ], "partner_data": [ { "partner_function": "AG", "partner_number": "0000003000", "address_data": { "name": "Thomas Bush Inc.", "city": "MAYWOOD", "district": "COOK", "street": "South 25th Ave", "postal_code_city": "60153", "region": "IL", "country": "US" } }, { "partner_function": "RG", "partner_number": "0000003050", "address_data": { "name": "Bush Holdings, Inc.", "city": "CHICAGO", "district": "COOK", "street": "Michigan Avenue", "postal_code_city": "60611", "region": "IL", "country": "US" } } ] }, "status": { "message_type": "S", "message_identification": "/CNBS/X_API", "message_number": 10, "message_line_string": "Request successfully processed" } }