API reference

List sync rejections

List the records a sync refused, or the values it dropped, one page at a time.

Generated from /openapi.json.

Request

GEThttps://www.postaged.com/api/integrations/push/v1/sync/rejections

The records a sync refused, or with type=warning the values it dropped from accepted records, one page at a time. Pass nextAfter back as after until it is null.

curl https://www.postaged.com/api/integrations/push/v1/sync/rejections \
  -H "Authorization: Bearer $POSTAGED_API_KEY"

Authentication

An integration key (it starts with pk_int_), created with New key on the integration's page. Send it in the Authorization: Bearer header. Only that integration's key works here; any other key gets 401 invalid_key.

Headers
Authorization: Bearer $POSTAGED_API_KEY
Content-Type: application/json

Parameters

  • syncIdstring (query)Optional
    The sync to read. Leave it out to read the latest sync.
  • typestring (query)Optional
    One of rejection or warning. Default rejection.
  • afterstring (query)Optional
    The nextAfter value of the previous page.
  • limitinteger (query)Optional
    1 to 1,000. Default 100.

Response 200

One page of issues.

  • syncIdstring
  • typestring
    One of rejection or warning.
  • itemsarray of objects
    • idinteger
    • batchinteger
    • indexinteger
    • externalIdstring or null
    • codestring
      A rejection code, or invalid_type for a dropped value.
    • fieldstring or null
    • messagestring
  • nextAfterstring or null
    Pass it back as after for the next page. Null on the last page.
Response200 OK
{
  "syncId": "0b6f3c3e-8d2a-4f7e-9a51-2c4d8e6f1a20",
  "type": "rejection",
  "items": [
    {
      "id": 7,
      "batch": 1,
      "index": 3,
      "externalId": "crm-1077",
      "code": "invalid_email",
      "field": "email",
      "message": "\"email\" does not look like an email address."
    }
  ],
  "nextAfter": null
}

Errors

Errors use the body { "error": { "code", "message", "details" } }; details appears only on some codes. Full tables: Error reference.

StatuscodemessageWhat to do
400invalid_sync_idsyncId must be the id a sync call returned.Fix the query parameter the message names: syncId is a sync id from a sync call, type is rejection or warning, after is the previous page's nextAfter, and limit is a whole number in range.
400invalid_typetype must be "rejection" or "warning".Fix the query parameter the message names: syncId is a sync id from a sync call, type is rejection or warning, after is the previous page's nextAfter, and limit is a whole number in range.
400invalid_cursorafter must be the nextAfter value of the previous page.Fix the query parameter the message names: syncId is a sync id from a sync call, type is rejection or warning, after is the previous page's nextAfter, and limit is a whole number in range.
400invalid_limitlimit must be a whole number from 1 to 1000.Fix the query parameter the message names: syncId is a sync id from a sync call, type is rejection or warning, after is the previous page's nextAfter, and limit is a whole number in range.
401invalid_keyThat API key is not valid for this integration.Send this integration's key (it starts with pk_int_) in the Authorization: Bearer header. A revoked key, another kind of key, or a key for a removed integration gets this error.
403integration_unavailableThis integration is not accepting data. Contact support if you think that is wrong.The integration is paused or disconnected in Postaged. Ask the owner to resume it, then send the request again.
404sync_not_foundThere is no sync with that id on this integration.Use a syncId this integration's sync calls returned, or leave it out to read the latest sync.
429rate_limitedToo many requests. Slow down and retry.Wait the number of seconds in the Retry-After header, then send the request again.
invalid_sync_id400
{
  "error": {
    "code": "invalid_sync_id",
    "message": "syncId must be the id a sync call returned."
  }
}
invalid_type400
{
  "error": {
    "code": "invalid_type",
    "message": "type must be \"rejection\" or \"warning\"."
  }
}
invalid_cursor400
{
  "error": {
    "code": "invalid_cursor",
    "message": "after must be the nextAfter value of the previous page."
  }
}
invalid_limit400
{
  "error": {
    "code": "invalid_limit",
    "message": "limit must be a whole number from 1 to 1000."
  }
}
invalid_key401
HTTP/1.1 401 Unauthorized
WWW-Authenticate: Bearer realm="Postaged"

{
  "error": {
    "code": "invalid_key",
    "message": "That API key is not valid for this integration."
  }
}
integration_unavailable403
{
  "error": {
    "code": "integration_unavailable",
    "message": "This integration is not accepting data. Contact support if you think that is wrong."
  }
}
sync_not_found404
{
  "error": {
    "code": "sync_not_found",
    "message": "There is no sync with that id on this integration."
  }
}
rate_limited429
HTTP/1.1 429 Too Many Requests
Retry-After: 60

{
  "error": {
    "code": "rate_limited",
    "message": "Too many requests. Slow down and retry."
  }
}