Update line item parameters
You can update or add missing information on a line item, such as the purchase order number, the name of your campaign, or notes, by calling PATCH {URI}/lineItems/{referenceLineItemID}
. To see your updates, use GET {URI}/lineItems/{referenceLineItemID}
endpoint after successfully updating the line item. See Get details for a specific line item for more information.
Note:
- You can only update or add a
purchaseOrderNumber
,campaign
, ororderNotes
.- If your original reward is sent via email, you can resend it to a new email address by using
POST {URI}/orders/{referenceOrderID}/resends
endpoint instead of updating your line item.
How to update a line item?
See the steps below:
- Call
PATCH {URI}/lineItems/{referenceLineItemID}
. - Enter
referenceLineItemID
for the line item you are planning to update. - Enter the values for one or more body parameters:
purchaseOrderNumber
,campaign
, ororderNotes
. A successful update will return a response of 202 Accepted. - Call
GET {URI}/lineItems/{referenceLineItemID}
to see the updated line item. See Get details for a specific line item.
Use the following endpoint to update a customer-defined parameter in a line item.
Endpoint | Purpose |
---|---|
PATCH {URI}/lineItems/{referenceLineItemID} | to update a line item on the platform. |
Use the following path parameter with this endpoint to identify which line item you're modifying:
Path params | Data type | Description |
---|---|---|
referenceLineItemID | string | (Required) Reference line item ID is returned in the line item's response. |
The following body parameters can be used to modify your data. You must submit at least one parameter when calling the endpoint. If you leave a parameter blank, it will not be updated.
Body params | Data type | Description |
---|---|---|
purchaseOrderNumber | string | The Purchase Order Number is associated with this order. |
campaign | string | (Optional) campaign that may be used to administratively categorize a specific order. |
orderNotes | string | (Optional) order notes (up to 150 characters) |
The 202 "Accepted" payload indicates the update has been successful:
{
Accepted
}
To see the updates in your line item, call GET {URI}/lineItems/{referenceLineItemID}
and enter the same referenceOrderID
again. You can see the latest updates in the payload.
The following example shows the payload before updating a line item. Note that campaign
and orderNotes
are missing in the response:
},
"sender": {
"firstName": "string",
"lastName": "string",
"email": "string"
},
"purchaseOrderNumber": "PO-12345",
"lineItemActionReason": "string",
"reward": {
"credentials": {
"additionalProp": "string"
},
The following example shows the payload after the line item has been successfully updated. Note that campaign
and orderNotes
are now visible after updating the line item. See Get details for a specific line item for more information:
},
"sender": {
"firstName": "string",
"lastName": "string",
"email": "string"
},
"purchaseOrderNumber": "PO-12345",
"campaign": "Employee-incentive",
"orderNotes": "Thank you",
"lineItemActionReason": "string",
"reward": {
"credentials": {
"additionalProp": "string"
},
The possible response codes for this endpoint are:
- 202 Accepted
- 400 Bad Request
- 401 Unauthorized
- 403 Forbidden
- 409 conflict, duplicate exists
- 422 Unprocessable entity
Updated 2 days ago