ZAP~POST API Documentation
  • ZAP~POST API Documentation
  • Connecting to the API
  • Authentication
  • API Endpoints
    • Campaigns
    • ScheduledSends
    • Submissions
    • RejectedRecords
    • ReturnedZaps
Powered by GitBook
On this page
Export as PDF
  1. API Endpoints

Campaigns

PreviousAPI EndpointsNextScheduledSends

Last updated 2 months ago

Campaigns allow users to send direct mail based on a real time events or actions which is specific to an individual customer. Each campaign has it's own configuration of required data in order to trigger a relevant ZAP for example a an abandoned basket campaign might require a session ID and a list of products but a customer birthday might only expect the recipient info and a birthday date

Users can list all campaigns available in ZAP POST. This will provide some basic campaign information such as the name and current status.

Useful Information

Campaign IDs are required for Submissions

Most of the time you'll be listing campaigns to find the ID of the appropriate campaign you wish to create a submission against or to check the progress of a historically created submission.

Expected Values

Expected values are configured against fields on the campaign. If any expected values exist, then the API will only accept the values within that list. For example, I might configure a DayOfTheWeek field on my campaign. If I do this I may configure the expected values "Monday","Tuesday","Wednesday","Thursday","Friday","Saturday" and "Sunday". This is intended to provide some basic validation to clients configuring their campaigns.

Validation Expressions

Validations are regex expressions and paired messages. When a record is received against the campaign ZAP will validate that all validation expressions are passed. If any fail, a list of errors will be compiled with the relevant message configured for the validation expression. This piece of functionality provides more advanced validation as the regex expressions can get quite complex.

Users can also look up a specific campaign which will include more detailed information regarding the custom field configuration on the campaign such as and .

expected values
validation expressions
get
Authorizations
Responses
200
Success
application/json
400
Bad Request
401
Unauthorized
get
GET /api/v1/campaigns HTTP/1.1
Host: 
Authorization: Basic username:password
Accept: */*
[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "clientId": "123e4567-e89b-12d3-a456-426614174000",
    "name": "text",
    "description": "text",
    "startDate": "2025-06-13T13:58:13.118Z",
    "duration": 1,
    "zapLimit": 1,
    "csvPath": "text",
    "enabled": true,
    "status": "text",
    "paperStockId": "123e4567-e89b-12d3-a456-426614174000",
    "zapsSent": 1,
    "archivedDate": "2025-06-13T13:58:13.118Z"
  }
]
get
Authorizations
Path parameters
campaignIdstring ยท uuidRequired
Responses
200
Success
application/json
401
Unauthorized
get
GET /api/v1/campaign/{campaignId} HTTP/1.1
Host: 
Authorization: Basic username:password
Accept: */*
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "text",
  "description": "text",
  "startDate": "2025-06-13T13:58:13.118Z",
  "status": "text",
  "paperStockName": "text",
  "paperStockId": "text",
  "fields": [
    {
      "name": "text",
      "description": "text",
      "label": "text",
      "exampleValue": "text",
      "mandatory": true,
      "expectedValues": [
        "text"
      ],
      "validationExpressions": [
        {
          "expression": "text",
          "message": "text"
        }
      ]
    }
  ]
}
  • GET/api/v1/campaigns
  • GET/api/v1/campaign/{campaignId}
  • Useful Information