Skip to main content

Outstanding Amount Sync

Use this API to keep each shop's outstanding balance in Mulltiply equal to the balance in your accounting or ERP system. Send only the shop's syncId and its current balance — no other customer data is needed.

At A Glance​

POST/v2/retailers/sync-outstanding
AreaDetail
Base URLhttps://api.mulltiply.com
Content typeapplication/json
Authenticationx-api-key request header
Request bodySingle object or array of objects, up to 5000 per request
Match keyShop syncId
Processing modeAsynchronous background processing

Headers​

Content-Type: application/json
x-api-key: YOUR_API_KEY

Which syncId To Send​

Outstanding amount is maintained per shop. Send the shop syncId — the value sent as shops[].syncId in Customer Sync.

If no shop has that syncId, the value is tried as a retailer syncId, and is accepted only when that retailer has exactly one shop in your store. This covers retailers that were synced without shops.

What you sendResult
Shop syncId, e.g. "RET-1001/SHOP-001"That shop is updated. Always preferred.
Retailer syncId of a retailer with one shop, e.g. "RET-2001"That retailer's only shop is updated.
Retailer syncId of a retailer with several shopsRejected as ambiguous. Send each shop's own syncId instead.
A syncId that matches neitherRejected: no shop found.
warning

A retailer with several shops can only be updated shop by shop. The API does not split or copy a retailer-level balance across its shops.

If one request contains both a shop's own syncId and its retailer's syncId, the shop syncId row is used and the retailer row is reported as skipped.

Request Fields​

FieldRequiredTypeMeaning
syncIdYesstring or numberShop syncId from Customer Sync, or the retailer syncId of a single-shop retailer.
outstandingAmountYesnumber or numeric stringThe shop's new total balance. outStandingAmount is accepted as an alias.

outstandingAmount is the new balance, not an amount to add or subtract:

Value sentResult
15400.50Balance becomes 15400.50
"1,250.00"Commas are removed; balance becomes 1250
0Balance is cleared (shop has paid in full)
-500Balance becomes -500 (advance / credit balance)

Request Body​

Batch request
[
{ "syncId": "RET-1001/SHOP-001", "outstandingAmount": 15400.50 },
{ "syncId": "RET-1001/SHOP-002", "outstandingAmount": 0 },
{ "syncId": "RET-1002/SHOP-001", "outstandingAmount": "1,250.00" },
{ "syncId": "RET-1003/SHOP-001", "outstandingAmount": -500 }
]

Processing Rules​

  1. Each row is validated on its own. An invalid row is rejected; the other rows still sync.
  2. If the same syncId appears more than once in one request, the last row is used.
  3. Valid rows are queued and the response returns immediately.
  4. In the background, each syncId is matched to a shop in your store: by shop syncId first, then by retailer syncId if that retailer has exactly one shop.
  5. A shop whose balance already equals the sent value is skipped.
  6. A syncId that matches no shop is recorded as an error in the bulk upload log. Nothing is created.
  7. Every changed balance is recorded in the shop's outstanding history.

Response​

The response is returned immediately after validation. Processing continues in the background.

All Rows Valid​

Queued response
{
"bulkUploadLogId": 8421,
"totalRows": 4,
"queuedRows": 4,
"failed": 0,
"failedRows": [],
"message": "Rows are being synced. Rows whose syncId matches no shop will be listed on the bulk upload log."
}

Some Rows Invalid​

Partial success
{
"bulkUploadLogId": 8422,
"totalRows": 3,
"queuedRows": 1,
"failed": 2,
"failedRows": [
{ "row": 2, "itemName": "syncId missing", "errors": ["syncId is required"] },
{ "row": 3, "itemName": "syncId RET-1002/SHOP-001", "errors": ["outstandingAmount must be a number"] }
],
"message": "Rows are being synced. Rows whose syncId matches no shop will be listed on the bulk upload log."
}

All Rows Invalid​

Nothing is queued.

All rows invalid
{
"bulkUploadLogId": 8423,
"totalRows": 1,
"queuedRows": 0,
"failed": 1,
"failedRows": [
{ "row": 1, "itemName": "syncId RET-1001/SHOP-001", "errors": ["outstandingAmount is required"] }
],
"message": "No valid rows to sync. Please check failedRows."
}
FieldMeaning
bulkUploadLogIdID of the bulk upload log for this request. The final result, including unmatched syncIds, is recorded there.
totalRowsTotal number of rows received.
queuedRowsRows that passed validation and were queued.
failedNumber of rows rejected during validation.
failedRowsRejected rows: row (1-based position in the request), itemName, and errors.
messageHuman-readable status.

Validation Errors​

MessageCause
syncId is requiredRow has no syncId, or it is empty.
outstandingAmount is requiredRow has no outstandingAmount (or outStandingAmount).
outstandingAmount must be a numberValue cannot be read as a number.
No shop found for syncId <syncId>Reported in the bulk upload log after processing: no shop in your store has this syncId.
syncId <syncId> is a retailer with N shops; send the shop syncId insteadReported in the bulk upload log: the retailer has more than one shop.
Skipped: the same shop was already updated by its shop syncId <syncId> in this requestReported in the bulk upload log: the request also contained the shop's own syncId, which was used instead.

Request-level errors (the whole request is rejected):

MessageCause
Request body must be a row or an array of rowsBody is empty, an empty array, or not an object.
At most 5000 rows can be synced per requestSplit the payload into smaller requests.

Behavior Notes​

BehaviorDetail
IdempotencyValues are absolute. Re-sending the same balance changes nothing.
Full resendSafe. Sending every shop on every run only updates shops whose balance changed.
Partial successInvalid rows are skipped and reported; valid rows still sync.
Large payloadsUp to 5000 rows per request, processed in the background.
OrderRequests for the same store are processed in the order they were received.

Implementation Checklist​

  • Sync customers and shops through Customer Sync first, with a syncId on every shop.
  • Send the shop syncId. Use the retailer syncId only for retailers that have a single shop.
  • Send the shop's current total balance, not a delta.
  • Send 0 for shops that have fully paid, so their balance is cleared.
  • Keep each request to 5000 rows or fewer.
  • Check the bulk upload log for syncIds that matched no shop.