Skip to navigation

List Sales

Returns sales for the authenticated SP Digital business using JSON-body filters only.

Example curl:

curl --request POST '{{base_url}}/sp/sales/list' \
--header 'Authorization: Bearer {{access_token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"location_id": {{location_id}},
"contact_id": {{contact_id}},
"start_date": "2026-01-01",
"end_date": "2026-12-31",
"per_page": 25,
"page": 1
}'

Example success response shape:

{
"success": true,
"message": "OK",
"data": [
{
"transaction_id": 1001,
"invoice_no": "INV-1001",
"contact_id": 456,
"total": 58.9,
"service_charge": 5,
"reward_points_earned": 10,
"reward_points_redeemed": 0
}
],
"meta": {
"pagination": {
"total": 1,
"per_page": 25,
"current_page": 1,
"last_page": 1,
"from": 1,
"to": 1
}
}
}

Example error response shape:

{
"success": false,
"message": "Unauthorized.",
"error": {
"code": "unauthorized",
"details": {}
}
}

Common platform errors:

  • sp_scope_not_granted
  • sp_token_scope_missing
  • sp_location_not_allowed
  • legacy_field_not_allowed
  • query_parameters_not_allowed
  • invalid_content_type

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Headers

AuthorizationstringOptional

Response

200 OK Example
successbooleanOptional
messagestringOptional
datalist of objectsOptional
metaobjectOptional