Maalam Developers

Errors

Every error the integration API can answer with, and what to do about each.

Every failure has the same shape:

{
  "error": {
    "code": "conflict",
    "message": "This code is already in use",
    "details": { "field": "code" }
  }
}

code is stable and is what your code should switch on. message is for a person reading a log, and may change. details, when present, says which field or what state.

HTTPcodeWhenWhat to do
400validation_errorA field is missing, the wrong type, or out of range. details lists each issue with its pathFix the request. Nothing was written
401unauthorizedNo key, a malformed key, an unknown key, or a revoked oneCheck the Authorization header; make a new key if this one was revoked
403forbiddendetails.reason: "suspended": the workspace is suspendedContact Maalam
404not_foundNo project with that slug, or no unit with that code in itCreate the project first; check the code
409conflictdetails.field names the collision: a frozen price on a held unit, a derived status, a duplicate codeSee Catalogue. Leave status out of re-syncs
429rate_limitedMore than the rate limit in a minuteWait for the window; back off
500internalSomething failed on Maalam's sideRetry with backoff; if it persists, tell Maalam and quote the x-request-id response header

Batches

A batch (POST /units/batch) answers 200 even when items fail. Each item carries its own outcome, and a failed one carries the same error object a single request would have returned.

On this page