POST
/
v1
/
templates
/
upsert
curl --request POST \
  --url https://api.sandbox.usenash.com/v1/templates/upsert \
  --header 'Content-Type: application/json' \
  --data '{
  "templates": [
    {
      "type": "DELIVERY_WINDOW",
      "deliveryWindowTemplatePayload": {
        "key": "value"
      },
      "externalId": "ext_01234567890123456789",
      "name": "Monday Delivery Window",
      "startDatetime": "2024-01-01T12:00:00",
      "endDatetime": "2024-01-01T12:00:00",
      "daysOfWeek": [
        "MONDAY",
        "TUESDAY"
      ],
      "generationFrequencyValue": 1,
      "generationFrequencyUnit": "DAY",
      "createInstancesUpToValue": 1,
      "createInstancesUpToUnit": "DAY",
      "overrideExistingInstances": true
    }
  ]
}'
{
  "templates": [
    {
      "id": "tpl_01234567890123456789",
      "type": "DELIVERY_WINDOW",
      "payload": {},
      "externalId": "<string>",
      "name": "<string>",
      "startDatetime": "2024-01-01T12:00:00",
      "endDatetime": "2024-01-01T12:00:00",
      "daysOfWeek": [
        "MONDAY",
        "TUESDAY"
      ],
      "generationFrequencyValue": 1,
      "generationFrequencyUnit": "DAY",
      "createInstancesUpToValue": 1,
      "createInstancesUpToUnit": "DAY",
      "overrideExistingInstances": true
    }
  ]
}

Body

application/json

Expected payload for creating multiple templates.

Response

200
application/json

OK

Response for a list of templates.