• Published on: 06 December 2023
  • Last edited on: 06 December 2023

Manually posting cXML Invoices using HTTP Client

Learn more about manually posting a cXML invoice using an HTTP client.

You can use HTTP Client to manually post cXML messages, such as POs & invoices. This is especially helpful when you have a sample file already from a supplier, and need to test the content of the file itself. It can help to determine whether an issue the supplier is having is due to the message itself, or their method of trying to post it. 

For invoices, put in the appropriate credentials, the body of the invoice, and hit send.

URL: receiving site, such as https://<INSTANCE>.coupahost.com/cxml/invoices

Method: POST

Header Name 1: Accept

Header Value 1: application/xml

Header Name 2: X-COUPA-API-KEY

Header Value 2: enter the API key from your instance

Paste the cXML Invoice message into the body. Click Send.

You'll be able to review error messages, as well as see what the supplier would receive as a response to sending in that invoice, including the status message.

 

Q: Do you have a recommendation on which RESTClient to use?

A: Yes, Firefox RESTClient. To install, open Firefox, go to Tools > Add-ons and follow the instructions. It's easy to use.

1-Method is POST

2-Enter the URL

3-Paste the cXML body. You don't need to set the header value or name.

4-Click Send and you will see the results in the 'Response Body (Raw)' tab.

Q: Can I just test the file format and not load the invoice in the system?

A: Yes; you would need to pass deploymentMode="test" in the file. If deploymentMode="production", then the invoice will load if it passes validations.

Q: What happens if "deploymentMode" is not specified in the cXML payload ?

A: When "deploymentMode" is not specified, the code will assume it is in "test" mode. Referenced also in 24.7 release notes.

Q: What kind of error I should expect when sending a cXML invoice using deploymentMode="test" ?

A: The system is only doing DTD validation when using deploymentMode="test". When sending the cXML invoice with deploymentMode="production" you may receive an error due to data validation as we are trying to create the invoice in the system. An example of data validation is entering an already existing invoice number.

Related Items


cXML Supplier Enablement

07 June 2022

Learn more about cXML supplier enablement.

API Endpoint for Supplier CSP Invites

06 December 2023

Supplier invites API endpoint lets you send bulk CSP invites or automate your invite workflow.

Why don't my suppliers get any email from Coupa?

14 June 2016

Learn how to fix supplier email issues.

Supplier Record Updates: Purchase Order Display

15 June 2016

Learn more about the Purchase Order Display field on the Supplier record.