Partner Services Sales REST API

Model Examples

Batch Sales Request

POST /api/v1/sales/addbatch

Required Headers

Authorization: Bearer <token>

Body

Submit a single JSON encoded PartnerSalesBatchRequest as the POST body.

Important: The number of items within the batch is limited to the value of the constant "MAX_BATCH_SIZE" witin the PartnerSalesBatchRequest model.

Returns

HTTP 200 on success (request was understood and the batch processing was able to be started)
HTTP 400 on malformed query (do not resubmit without fixes)
HTTP 401 on invalid/missing Authorization token (do not resubmit without updating Authorization)
HTTP 403 on attempting to access an OutletID or ZReportID you do not have access to
HTTP 404 on attempting to access an OutletID or ZReportID that could not be found
HTTP 5XX on an error internal to the Partner Service.

On failure the response body will be a single JSON encoded ErrorResponse

On success the response body will be a single JSON encoded PartnerSalesBatchResponse. This will contain an overall batch result, and individual results for each item within the batch.


Z Report Request

POST /api/v1/sales/requestzreport

Required Headers

Authorization: Bearer <token>

Body

Submit a single JSON encoded PartnerZReportRequest as the POST body.

Returns

  • HTTP 200 on success (request was understood and the batch processing was able to be started)
  • HTTP 400 on malformed query (do not resubmit without fixes)
  • HTTP 401 on invalid/missing Authorization token (do not resubmit without updating Authorization)
  • HTTP 403 on attempting to access an OutletID or ZReportID you do not have access to
  • HTTP 404 on attempting to access an OutletID or ZReportID that could not be found
  • HTTP 5XX on an error internal to the Partner Service.

On failure the response body will be a single JSON encoded ErrorResponse

On success the response body will be a single JSON encoded PartnerZReportResponse. This will contain information about the Z Report, including its ZReportID.


Z Finalise Request

POST /api/v1/sales/finalisezreport

Required Headers

Authorization: Bearer <token>

Body

Submit a single JSON encoded PartnerZFinaliseRequest as the POST body.

Returns

  • HTTP 200 on success (request was understood and the batch processing was able to be started)
  • HTTP 400 on malformed query (do not resubmit without fixes)
  • HTTP 401 on invalid/missing Authorization token (do not resubmit without updating Authorization)
  • HTTP 403 on attempting to access an OutletID or ZReportID you do not have access to
  • HTTP 404 on attempting to access an OutletID or ZReportID that could not be found
  • HTTP 5XX on an error internal to the Partner Service.

On failure the response body will be a single JSON encoded ErrorResponse

On success the response body will be a single JSON encoded PartnerZFinaliseResponse. This will contain information about the Z Report, including its ZReportID.