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, or orderNotes.
  • If your original reward is sent via email, you can resend it to a new email address by usingPOST {URI}/orders/{referenceOrderID}/resends endpoint instead of updating your line item.

How to update a line item?

See the steps below:

  1. Call PATCH {URI}/lineItems/{referenceLineItemID}.
  2. Enter referenceLineItemID for the line item you are planning to update.
  3. Enter the values for one or more body parameters: purchaseOrderNumber, campaign, or orderNotes. A successful update will return a response of 202 Accepted.
  4. CallGET {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.

EndpointPurpose
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 paramsData typeDescription
referenceLineItemIDstring(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 paramsData typeDescription
purchaseOrderNumberstringThe Purchase Order Number is associated with this order.
campaignstring(Optional) campaign that may be used to administratively categorize a specific order.
orderNotesstring(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

Rewards as a Service™ and the RaaS® API are provided by Tango Card, Inc. © 2024 Tango Card, Inc.