API Endpoint for Supplier CSP Invites
Supplier invites API endpoint lets you send bulk CSP invites or automate your invite workflow.
Introduction
You can invite suppliers to the CSP when you create or edit a supplier record, or from the Actions column in the Suppliers table or the Invite button under the table after selecting the supplier(s). For more information on inviting a single supplier from the supplier record or multiple suppliers from the Suppliers page, see Onboarding Portal Suppliers in Coupa.
Or you can use the API endpoint at /api/supplier_
invites
to automate your supplier invites to the Coupa Supplier Portal (CSP) and invite multiple suppliers in a single API call.
How it works
Invites sent using the API at /api/supplier_
invites
behave just like invites sent using the UI and use the same supplier contact email address. You can send invites to a maximum of 500 suppliers in a single API call.
Suppliers without a CSP account get an email invitation and their CSP status in Coupa is updated to Invited. Once they accept the invitation and create an account, their status changes to Linked. Suppliers that already have a CSP account are notified that they are linked to a new customer and their status in Coupa is immediately updated to Linked.
When you POST an invite request, Coupa runs a background job that iterates through the suppliers and sends emails to suppliers that are eligible for invites. There are a couple of conditions for suppliers to be eligible for a CSP invite:
- The supplier's status cannot be Inactive or Draft.
- Under Supplier Contact on the supplier's record, the First Name, Last Name, and Email fields must be filled out.
API elements
The API accepts both XML and JSON, and lets you specify the following information in your API call:
Element | Description | Type | Required | Notes |
---|---|---|---|---|
id | Coupa's unique identifier for the supplier, as assigned by the system. | integer | Yes | |
email-body | The main body of the email text. Use escape characters to include HTML elements in the email body. | text | No | Additional info added to email shown below. |
can_manage_contact_info | Selects the Set by Supplier checkbox for all possible sections on the supplier record, allowing them to update their own record in Coupa. | boolean | No | Default is TRUE. |
Supplier invitation email format
The email that Coupa sends is more than just the email body that you specify in the API call. It includes the following parts:
Number | Email element | Description |
---|---|---|
1 | Subject line | The subject line is not configurable; it is always Please confirm your email. |
2 | Email body | The text that is defined in the email-body element of the API call. |
3 | Sender info | The name of the sender and their company. Based on the sender's Coupa user First Name and Last Name, and the Company Name as specified on the Company Information page. |
4 | Invite details | Boilerplate text and supplier-specific invite URL that Coupa adds to the email. |
Example API calls
The API supports two basic functions: POST supplier invitation request, and GET the status of a supplier's invitation.
Invite a supplier to the CSP
Invite suppliers to the CSP using the API by sending an authenticated API call:POST https://{your_instance}.coupahost.com/api/supplier_invites/
Payload
<?xml version="1.0" encoding="UTF-8"?>
<supplier-invite>
<suppliers>
<supplier><id>1</id></supplier>
<supplier><id>2</id></supplier>
</suppliers>
<email-body>Message Here</email-body>
<can_manage_contact_info>true</can_manage_contact_info>
</supplier-invite>
200 Success response
<?xml version="1.0" encoding="UTF-8"?>
<supplier-invite>
<id type="integer">179558</id>
<status>submitted_to_resque</status>
</supplier-invite>
422 Unprocessable entity
<errors>
<error>There are no valid suppliers among specified</error>
</errors>
If the bulk invite action is not successful, it returns an xml
of an error or a generated background job's xml
, which you can use later to see the state of your background job.
Check the status of an invited supplier
Check the status of a supplier's CSP invite by calling:GET https://{your_instance}.coupahost.com/api/suppler_invites/:id GET
200 Success response
<supplier-invite>
<id>157</id>
<status>done</status>
</supplier-invite>