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

Submissions

PreviousScheduledSendsNextRejectedRecords

Last updated 1 month ago

Submissions are collections of records that are submitted against a campaign. The records are made up of the required recipient information and the relevant campaign specific fields that have been configured in the The POST endpoints allow users to submit either an entire self contained collection of records intended to be sent together on a specific date or they can submit individual records after an appropriate event has occurred.

Record Batching

Its very important to note that low volumes of records submitted to the ZAPI will be compiled into larger submissions at the end of each day. This is to reduce the total volume of submissions created against a campaign and make monitoring a much easier task for regularly scheduled campaigns. This means you won't be able to query for any updates on records submitted until the day after submission when they've been batched.

A common use case for the records endpoint would be to submit an individual record when a basket is abandoned for an e-com journey or for a customer quote request

A common use case for this endpoint would be when adding a collection of related records such as a group of renewal reminders for a monthly send or a list of lapsed customers

Users can also list any submissions that exist against a campaign or list submissions actively working through the ZAP flow before being sent.

Useful information

Scheduled Send Date selection

Any records or submissions sent to the ZAP API will be automatically included on the soonest available scheduled send if one is not specified. Unless you wish to use a specific send in the future it's most likely you don't need to specify the scheduled send on the request.

The OnlyValidRecords property

When creating a submission users have the option to set 'OnlyValidRecords' to true or false. When true the records in the submission will only be accepted if every record is valid. If 'OnlyValidRecords' is set to false, then any records that pass validation will be accepted and any that fail will not and will be returned in the usual response format detailing the validation failures.

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". Any records that fail because of an expected value will have the list of valid values returned in the error provided on submission.

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.

Custom Data

The custom data object is used for custom fields that are created for a campaign. Each customField property should match the 'label' given to the matching custom field. Querying the GET campaign/{CampaignId} endpoint will return a list of all custom fields for the campaign.

Records endpoint duplicate customer ids within separate submissions:

We now support people submitting the same customer id more than once over separate requests to the "/records" endpoint. As a submission will only allow a single customer id, we will retain the data for the first record with that customer id and return a new "duplicateIgnoredRecords" object on any following requests that lists any records from the current submission that have not been accepted due to duplicates.

Default Field Validation

Property
Mandatory
ErrorMessage
Max Text Length

CustomerId

Yes

Must be unique

100

Email

No

be in standard email address format.

255

Company Name

No*

Must be alphanumeric, space, -, (, ), full-stop and ' only.

120 total**

Salutation

No*

Must be alphanumeric, full-stop and space only.

120 total**

Firstname

No*

Must be alphanumeric, space, -, (, ), full-stop and ' only.

120 total**

Surname

No*

Must be alphanumeric, space, -, (, ), full-stop and ' only.

120 total**

Address1

No***

Must contain alphanumeric, space, ', ., &, -, /, \, ), ( and , characters only.

150 total****

Address2

No***

Must contain alphanumeric, space, ', ., &, -, /, \, ), ( and , characters only.

150 total****

Address3

No***

Must contain alphanumeric, space, ', ., &, -, /, \, ), ( and , characters only.

150 total****

City

No***

Must contain alphanumeric, space, ', ., &, -, /, \ and , characters only.

150 total****

Postcode

No***

Must be alphanumeric, - and spaces only.

150 total****

Country

Yes

Must contain letters, space, -, (, ), full-stop, & and ' only.

255

Currency

No

Must contain letters only.

3

Language

No

Must contain letters only.

10

* The delivery name cannot be null, some combination of Salutation, First Name, Surname and Company Name is required.

** Since the name can be comprised of multiple fields the 120 character maximum applies cumulatively across the following fields Salutation, First Name, Surname and Company name

*** We will allow you to submit any combination address fields however we do require an address to deliver to. Your submission can be made up or one of more of the following fields: Address1, Address2, Address3, City, Postcode. Since some of our clients don't usually hold customer addresses, their data isn't always standardised. This makes it easier to submit the data you do have and we'll do the clean up.

**** Since the name can be comprised of multiple fields the 150 character maximum applies cumulatively across the following fields: Address1, Address2, Address3, City, Postcode

ZAP APP
get
Authorizations
Path parameters
campaignIdstring · uuidRequired
Responses
200
Success
application/json
400
Bad Request
401
Unauthorized
404
Not Found
get
GET /api/v1/Submissions/{campaignId} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
[
  {
    "campaignId": "123e4567-e89b-12d3-a456-426614174000",
    "submissionId": "123e4567-e89b-12d3-a456-426614174000",
    "submissionDateUTC": "2025-06-13T15:28:37.863Z",
    "scheduledSendDateUTC": "2025-06-13T15:28:37.863Z",
    "status": "text",
    "recordsCount": 1
  }
]
get
Authorizations
Path parameters
campaignIdstring · uuidRequired
Responses
200
Success
application/json
400
Bad Request
401
Unauthorized
404
Not Found
get
GET /api/v1/Submissions/Active/{campaignId} HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
[
  {
    "campaignId": "123e4567-e89b-12d3-a456-426614174000",
    "submissionId": "123e4567-e89b-12d3-a456-426614174000",
    "submissionDateUTC": "2025-06-13T15:28:37.863Z",
    "scheduledSendDateUTC": "2025-06-13T15:28:37.863Z",
    "status": "text",
    "recordsCount": 1
  }
]
  • Record Batching
  • POST/api/v1/records
  • POST/api/v1/submissions
  • GET/api/v1/Submissions/{campaignId}
  • GET/api/v1/Submissions/Active/{campaignId}
  • Useful information
post

For more information visit the documentation

Authorizations
Body
all ofOptionalExample: {"campaignId":"f8db0756-947d-4ef8-935f-37d6c282fe19","scheduledSendDateId":"5cc5a5e6-714c-4dcb-8202-ca2ede6cc0b0","onlyValidRecords":true,"submissions":[{"customerid":"Value","email":"Value","salutation":"Value","firstname":"Value","surname":"Value","companyname":"Value","address1":"Value","address2":"Value","address3":"Value","city":"Value","postcode":"Value","country":"Value","currency":"Value","language":"Value","customData":{"customField1":"Value","customField2":"Value"}}]}
Responses
200
Success
application/json
400
Bad Request
401
Unauthorized
404
Not Found
post
POST /api/v1/records HTTP/1.1
Host: 
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 482

{
  "campaignId": "f8db0756-947d-4ef8-935f-37d6c282fe19",
  "scheduledSendDateId": "5cc5a5e6-714c-4dcb-8202-ca2ede6cc0b0",
  "onlyValidRecords": true,
  "submissions": [
    {
      "customerid": "Value",
      "email": "Value",
      "salutation": "Value",
      "firstname": "Value",
      "surname": "Value",
      "companyname": "Value",
      "address1": "Value",
      "address2": "Value",
      "address3": "Value",
      "city": "Value",
      "postcode": "Value",
      "country": "Value",
      "currency": "Value",
      "language": "Value",
      "customData": {
        "customField1": "Value",
        "customField2": "Value"
      }
    }
  ]
}
{
  "validRecords": [
    {
      "ANY_ADDITIONAL_PROPERTY": "anything"
    }
  ],
  "invalidRecords": [
    {
      "ANY_ADDITIONAL_PROPERTY": "anything"
    }
  ],
  "duplicateIgnoredRecords": [
    {
      "ANY_ADDITIONAL_PROPERTY": "anything"
    }
  ],
  "responseMessage": "text",
  "submissionId": "123e4567-e89b-12d3-a456-426614174000"
}
post

For more information visit the documentation

Authorizations
Body
all ofOptionalExample: {"campaignId":"904c1dac-4db2-46a2-b97a-f0dae573d707","scheduledSendDateId":"4ad53391-9f29-49bd-93c6-abe5be40d37d","onlyValidRecords":true,"submissions":[{"customerid":"Value","email":"Value","salutation":"Value","firstname":"Value","surname":"Value","companyname":"Value","address1":"Value","address2":"Value","address3":"Value","city":"Value","postcode":"Value","country":"Value","currency":"Value","language":"Value","customData":{"customField1":"Value","customField2":"Value"}}]}
Responses
200
Success
application/json
400
Bad Request
401
Unauthorized
404
Not Found
post
POST /api/v1/submissions HTTP/1.1
Host: 
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 482

{
  "campaignId": "904c1dac-4db2-46a2-b97a-f0dae573d707",
  "scheduledSendDateId": "4ad53391-9f29-49bd-93c6-abe5be40d37d",
  "onlyValidRecords": true,
  "submissions": [
    {
      "customerid": "Value",
      "email": "Value",
      "salutation": "Value",
      "firstname": "Value",
      "surname": "Value",
      "companyname": "Value",
      "address1": "Value",
      "address2": "Value",
      "address3": "Value",
      "city": "Value",
      "postcode": "Value",
      "country": "Value",
      "currency": "Value",
      "language": "Value",
      "customData": {
        "customField1": "Value",
        "customField2": "Value"
      }
    }
  ]
}
{
  "validatedSubmissions": [
    {
      "ANY_ADDITIONAL_PROPERTY": "anything"
    }
  ],
  "responseMessage": "text",
  "submissionId": "123e4567-e89b-12d3-a456-426614174000",
  "invalidSubmissions": [
    {
      "ANY_ADDITIONAL_PROPERTY": "anything"
    }
  ]
}