{ "$schema": "http://json-schema.org/draft-07/schema#", "title": "Listrak Sms API Schemas", "definitions": { "BroadcastMessage": { "description": "A Broadcast Message resource.", "required": [ "phoneListId", "messageContent", "messageTitle" ], "type": "object", "properties": { "phoneListId": { "format": "int32", "description": "Identifier for an SMS List.", "type": "integer" }, "messageContent": { "description": "Content of the SMS broadcast message.", "type": "string" }, "messageTitle": { "description": "The name of the SMS broadcast message, used for reporting purposes.", "maxLength": 50, "minLength": 1, "type": "string" }, "segmentationFieldId": { "description": "The identifier of a custom checkbox field to use for filtering. The message will only be sent to recipients with this field checked.", "type": "string" } } }, "ResourceCreated": { "type": "object", "properties": { "status": { "format": "int32", "description": "HTTP status code.", "type": "integer" }, "resourceId": { "description": "An identifier used to locate a resource.", "type": "string" } } }, "Error": { "type": "object", "properties": { "status": { "format": "int32", "description": "HTTP status code.", "type": "integer" }, "error": { "description": "Error code indicating what error has occured.", "type": "string" }, "message": { "description": "Message describing the status and the error that occurred.", "type": "string" } } }, "CollectionPaged[SMSContact]": { "type": "object", "properties": { "status": { "format": "int32", "description": "HTTP status code.", "type": "integer" }, "nextPageCursor": { "description": "URI of the next page of data.", "type": "string" }, "data": { "description": "Collection of data that exists on this paged view.", "type": "array", "items": { "$ref": "#/definitions/SMSContact" } } } }, "SMSContact": { "type": "object", "properties": { "phoneNumber": { "type": "string" }, "emailAddress": { "type": "string" }, "firstName": { "type": "string" }, "lastName": { "type": "string" }, "birthday": { "format": "date-time", "type": "string", "x-nullable": true }, "postalCode": { "type": "string" }, "optedOut": { "type": "boolean" }, "segmentationFieldValues": { "type": "array", "items": { "$ref": "#/definitions/SMSPhoneContactAttribute" } } } }, "SMSPhoneContactAttribute": { "type": "object", "properties": { "segmentationFieldId": { "format": "int32", "type": "integer" }, "value": { "type": "string" } } }, "Resource[SMSContactSubscriptionDetails]": { "type": "object", "properties": { "status": { "format": "int32", "description": "HTTP status code.", "type": "integer" }, "data": { "$ref": "#/definitions/SMSContactSubscriptionDetails", "description": "Return data." } } }, "SMSContactSubscriptionDetails": { "type": "object", "properties": { "subscribeDate": { "format": "date-time", "description": "Subscription date of an SMS Contact.", "type": "string", "x-nullable": true }, "unsubscribeDate": { "format": "date-time", "description": "Date of opt-out from an SMS sender code.", "type": "string", "x-nullable": true }, "phoneNumber": { "type": "string" }, "emailAddress": { "type": "string" }, "firstName": { "type": "string" }, "lastName": { "type": "string" }, "birthday": { "format": "date-time", "type": "string", "x-nullable": true }, "postalCode": { "type": "string" }, "optedOut": { "type": "boolean" }, "segmentationFieldValues": { "type": "array", "items": { "$ref": "#/definitions/SMSPhoneContactAttribute" } } } }, "ResourceUpdated": { "type": "object", "properties": { "status": { "format": "int32", "description": "HTTP status code.", "type": "integer" }, "resourceId": { "description": "An identifier used to locate the updated resource.", "type": "string" } } }, "CollectionPaged[OptOutContact]": { "type": "object", "properties": { "status": { "format": "int32", "description": "HTTP status code.", "type": "integer" }, "nextPageCursor": { "description": "URI of the next page of data.", "type": "string" }, "data": { "description": "Collection of data that exists on this paged view.", "type": "array", "items": { "$ref": "#/definitions/OptOutContact" } } } }, "OptOutContact": { "type": "object", "properties": { "phoneNumber": { "type": "string" }, "optOutDate": { "format": "date-time", "type": "string" }, "optOutReason": { "enum": [ "Campaign", "Admin", "DeliveryFailure", "Import", "API", "Deactivated", "PermanentError", "Workflow" ], "type": "string" } } }, "Collection[OptOutContact]": { "type": "object", "properties": { "status": { "format": "int32", "description": "HTTP status code.", "type": "integer" }, "data": { "description": "Collection of return data from the given call.", "type": "array", "items": { "$ref": "#/definitions/OptOutContact" } } } }, "ImportContactFile": { "description": "A Contact Import File resource.", "required": [ "fileName", "fileStream", "importType", "hasColumnNames", "textQualifier", "fileMappings" ], "type": "object", "properties": { "fileName": { "description": "Filename of the import file.", "type": "string" }, "fileStream": { "format": "byte", "description": "Base64-encoded byte array representation of the import file.", "type": "string" }, "importType": { "description": "The type of import to conduct. Allowed values are `UpdateSubscribers`.", "type": "string" }, "hasColumnNames": { "description": "Whether the first line of the import file contains column names.", "type": "boolean" }, "textQualifier": { "description": "The text qualifier used for the import file. Allowed values are `'`, `\"` and blank.", "type": "string" }, "fileMappings": { "description": "Representation of import file mappings; these map file columns to import fields.", "type": "array", "items": { "$ref": "#/definitions/ImportContactFileMapping" } } } }, "ImportContactFileMapping": { "description": "A Contact Import File Mapping resource.", "required": [ "fileColumnType", "segmentationFieldId", "fileColumn" ], "type": "object", "properties": { "fileColumnType": { "description": "Type of value in the column of the import file. Allowed values are `Phone` and `SegmentationField`.", "type": "string" }, "segmentationFieldId": { "format": "int32", "description": "Identifier of the associated profile field.\r\n- FileColumnType `Phone` must have a value of `0`.\r\n- FileColumnType `SegmentationField` must have a valid SegmentationFieldId for this SenderCode.", "type": "integer" }, "fileColumn": { "format": "int32", "description": "Number identifying the column's ordinal position in the file, starting from `0`.", "type": "integer" }, "defaultValue": { "description": "Default value to be used if a value is not provided during the import.", "type": "string" } } }, "Resource[ImportContactFileStatus]": { "type": "object", "properties": { "status": { "format": "int32", "description": "HTTP status code.", "type": "integer" }, "data": { "$ref": "#/definitions/ImportContactFileStatus", "description": "Return data." } } }, "ImportContactFileStatus": { "type": "object", "properties": { "importFileId": { "format": "int32", "type": "integer" }, "smsSenderCodeId": { "format": "int32", "type": "integer" }, "fileName": { "type": "string" }, "startDate": { "format": "date-time", "type": "string", "x-nullable": true }, "endDate": { "format": "date-time", "type": "string", "x-nullable": true }, "status": { "type": "string" } } }, "CollectionPaged[ContactListSubscription]": { "type": "object", "properties": { "status": { "format": "int32", "description": "HTTP status code.", "type": "integer" }, "nextPageCursor": { "description": "URI of the next page of data.", "type": "string" }, "data": { "description": "Collection of data that exists on this paged view.", "type": "array", "items": { "$ref": "#/definitions/ContactListSubscription" } } } }, "ContactListSubscription": { "description": "A Contact List Subscription Resource.", "type": "object", "properties": { "phoneListId": { "format": "int32", "description": "Identifier for a Phone List.", "type": "integer" }, "subscriptionState": { "description": "The State of a Contact's Subscription.", "type": "string" }, "subscribeDate": { "format": "date-time", "description": "The Date a Contact Subscribed to a List.", "type": "string", "x-nullable": true }, "unsubscribeDate": { "format": "date-time", "description": "The Date a Contact Unsubscribed from a List.", "type": "string", "x-nullable": true }, "pendingDate": { "format": "date-time", "description": "The Date a Contact entered a pending state on a List.", "type": "string", "x-nullable": true }, "pendingDoubleOptIn": { "description": "Flag for if a contact is pending a double opt-in subscription.", "type": "boolean" }, "pendingAgeGate": { "description": "Flag for if a contact is pending an age gate response", "type": "boolean" } } }, "Collection[ContactListSubscription]": { "type": "object", "properties": { "status": { "format": "int32", "description": "HTTP status code.", "type": "integer" }, "data": { "description": "Collection of return data from the given call.", "type": "array", "items": { "$ref": "#/definitions/ContactListSubscription" } } } }, "ResourceDeleted": { "type": "object", "properties": { "status": { "format": "int32", "description": "HTTP status code.", "type": "integer" } } }, "CollectionPaged[PhoneList]": { "type": "object", "properties": { "status": { "format": "int32", "description": "HTTP status code.", "type": "integer" }, "nextPageCursor": { "description": "URI of the next page of data.", "type": "string" }, "data": { "description": "Collection of data that exists on this paged view.", "type": "array", "items": { "$ref": "#/definitions/PhoneList" } } } }, "PhoneList": { "description": "SMS Phone List Resource.", "type": "object", "properties": { "phoneListId": { "format": "int32", "description": "Identifier for an SMS Phone List.", "type": "integer" }, "phoneListName": { "description": "Name of SMS Phone List.", "type": "string" }, "createDate": { "format": "date-time", "description": "Create Date of SMS Phone List.", "type": "string" }, "status": { "description": "Status of SMS Phone List.", "type": "string" }, "smsListType": { "description": "Type of SMS Phone List.", "type": "string" }, "messageLimit": { "format": "int32", "description": "DEPRECATED as of May 2021.", "type": "integer" }, "messageLimitTimeFrame": { "description": "DEPRECATED as of May 2021.", "type": "string" }, "requireDoubleOptIn": { "description": "SMS Phone List Requires Double Opt In.", "type": "boolean" }, "requireAgeGate": { "description": "SMS Phone List Requires Age Gate.", "type": "boolean" } } }, "Collection[PhoneList]": { "type": "object", "properties": { "status": { "format": "int32", "description": "HTTP status code.", "type": "integer" }, "data": { "description": "Collection of return data from the given call.", "type": "array", "items": { "$ref": "#/definitions/PhoneList" } } } }, "Resource[PhoneAttribute]": { "type": "object", "properties": { "status": { "format": "int32", "description": "HTTP status code.", "type": "integer" }, "data": { "$ref": "#/definitions/PhoneAttribute", "description": "Return data." } } }, "PhoneAttribute": { "description": "A Profile Field resource.", "type": "object", "properties": { "segmentationFieldId": { "format": "int32", "description": "Identifier of the profile field.", "type": "integer" }, "segmentationFieldName": { "description": "Name of the profile field.", "type": "string" }, "dataType": { "description": "Data type of the profile field. Allowed values are `Text`, `Number`, `Checkbox`, and `Date`.", "type": "string" }, "maxLength": { "format": "int32", "description": "The maximum character count of the data that can be stored in the profile field.", "type": "integer", "x-nullable": true }, "statusFlag": { "description": "Identifier of the status of the profile field.", "type": "string" } } }, "CollectionPaged[PhoneAttribute]": { "type": "object", "properties": { "status": { "format": "int32", "description": "HTTP status code.", "type": "integer" }, "nextPageCursor": { "description": "URI of the next page of data.", "type": "string" }, "data": { "description": "Collection of data that exists on this paged view.", "type": "array", "items": { "$ref": "#/definitions/PhoneAttribute" } } } }, "Collection[PhoneAttribute]": { "type": "object", "properties": { "status": { "format": "int32", "description": "HTTP status code.", "type": "integer" }, "data": { "description": "Collection of return data from the given call.", "type": "array", "items": { "$ref": "#/definitions/PhoneAttribute" } } } }, "Collection[SenderCode]": { "type": "object", "properties": { "status": { "format": "int32", "description": "HTTP status code.", "type": "integer" }, "data": { "description": "Collection of return data from the given call.", "type": "array", "items": { "$ref": "#/definitions/SenderCode" } } } }, "SenderCode": { "description": "SMS Sender Code Resource.", "type": "object", "properties": { "shortCodeId": { "format": "int32", "description": "Identifier used to locate sender code resource.\r\nKeeping it named ShortCodeId to not potentially break client integrations.\r\nIf this parameter name changes, it will change the response bodies of the SenderCodeController routes, and will\r\nrequire adjustments by clients.", "type": "integer" }, "code": { "description": "SMS Sender Code.", "type": "string" }, "country": { "description": "ISO 3166-1 Alpha-2 code of the country associated with sender code.", "type": "string" }, "merchantName": { "description": "Name of merchant associated with sender code.", "type": "string" }, "emailListId": { "format": "int32", "description": "Identifier of email list associated with sender code.", "type": "integer" }, "emailListName": { "description": "Name of email list associated with sender code.", "type": "string" }, "externalEventId": { "format": "int32", "description": "Identifier of external event associated with sender code.", "type": "integer" }, "externalEventName": { "description": "Name of external event associated with sender code.", "type": "string" }, "phoneNumberSegmentationFieldGroupId": { "format": "int32", "description": "Email list attribute id to store a contact's phone number.", "type": "integer" }, "phoneNumberSegmentationFieldGroupName": { "description": "Email list attribute name to store a contact's phone number.", "type": "string" }, "phoneNumberSegmentationFieldId": { "format": "int32", "description": "Email list attribute group id to store a contact's phone number.", "type": "integer" }, "phoneNumberSegmentationFieldName": { "description": "Email list attribute group name to store a contact's phone number.", "type": "string" }, "acquisitionSourceSegmentationFieldGroupId": { "format": "int32", "description": "Email list attribute group id to store a contact's acquisition source.", "type": "integer" }, "acquisitionSourceSegmentationFieldGroupName": { "description": "Email list attribute group name to store a contact's acquisition source.", "type": "string" }, "acquisitionSourceSegmentationFieldId": { "format": "int32", "description": "Email list attribute id to store a contact's acquisition source.", "type": "integer" }, "acquisitionSourceSegmentationFieldName": { "description": "Email list attribute name to store a contact's acquisition source.", "type": "string" } } }, "Resource[SenderCode]": { "type": "object", "properties": { "status": { "format": "int32", "description": "HTTP status code.", "type": "integer" }, "data": { "$ref": "#/definitions/SenderCode", "description": "Return data." } } }, "Collection[TransactionalMessage]": { "type": "object", "properties": { "status": { "format": "int32", "description": "HTTP status code.", "type": "integer" }, "data": { "description": "Collection of return data from the given call.", "type": "array", "items": { "$ref": "#/definitions/TransactionalMessage" } } } }, "TransactionalMessage": { "description": "A Transactional Message resource.", "type": "object", "properties": { "transactionalMessageId": { "format": "int32", "description": "Identifier used to locate a transactional message.", "type": "integer" }, "transactionalMessageName": { "description": "Name given to a transactional message.", "type": "string" }, "transactionalMessageStatus": { "description": "Status of a transactional message.", "type": "string" } } }, "TransactionalMessageContact": { "description": "A Transactional Message Contact resource.", "type": "object", "properties": { "phoneNumber": { "description": "Phone Number associated with a contact.", "type": "string" }, "messageContent": { "description": "Content of SMS Message.", "type": "string" } } } } }