Skip to main content

Credit Days Sync

Use this API to keep each shop's credit period in Mulltiply equal to the credit period in your accounting or ERP system. The credit period decides the payment due date of the shop's future orders.

At A Glance​

POST/v2/retailers/sync-credit-days
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​

Credit days are 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 credit days 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.
creditDaysYes (the key must be present)integer, numeric string, or nullNumber of days after an order is placed before payment is due.
Value sentResult
30 or "30"Orders placed from now on are due 30 days after they are placed.
null or ""The shop's credit terms are removed; new orders have no payment due date.
0, 12.5, 400Rejected — must be a whole number from 1 to 365.

Request Body​

Batch request
[
{ "syncId": "RET-1001/SHOP-001", "creditDays": 30 },
{ "syncId": "RET-1001/SHOP-002", "creditDays": 45 },
{ "syncId": "RET-1002/SHOP-001", "creditDays": null }
]

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 credit days already equal 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 change is recorded in the shop's credit terms history and audit log.

Effect On Orders​

  • New credit days apply only to orders placed after the sync.
  • Payment due dates on existing orders do not change.
  • A shop can have either credit days or a fixed payment due date, not both. If a shop had a fixed due date set in Mulltiply, syncing credit days replaces it.

Response​

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

All Rows Valid​

Queued response
{
"bulkUploadLogId": 8431,
"totalRows": 3,
"queuedRows": 3,
"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": 8432,
"totalRows": 3,
"queuedRows": 1,
"failed": 2,
"failedRows": [
{ "row": 2, "itemName": "syncId RET-1001/SHOP-002", "errors": ["creditDays must be a whole number between 1 and 365"] },
{ "row": 3, "itemName": "syncId RET-1002/SHOP-001", "errors": ["creditDays is required"] }
],
"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": 8433,
"totalRows": 1,
"queuedRows": 0,
"failed": 1,
"failedRows": [
{ "row": 1, "itemName": "syncId missing", "errors": ["syncId 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.
creditDays is requiredRow has no creditDays key. Send null to remove credit terms.
creditDays must be a whole number between 1 and 365Value is 0, negative, a decimal, above 365, or not 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 credit days changes nothing.
Full resendSafe. Sending every shop on every run only updates shops whose credit days 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.
  • Always include the creditDays key; use null to remove a shop's credit terms.
  • Send whole numbers from 1 to 365 only.
  • Keep each request to 5000 rows or fewer.
  • Check the bulk upload log for syncIds that matched no shop.