Zaius Consent API

The Consent API from Zaius — 2 operation(s) for consent.

OpenAPI Specification

zaius-consent-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Advanced Compliance Consent API
  description: Advanced
  version: v3
servers:
- url: https://api.us1.odp.optimizely.com/v3
  description: United States
- url: https://api.eu1.odp.optimizely.com/v3
  description: Europe
- url: https://api.au1.odp.optimizely.com/v3
  description: Asia-Pacific
security:
- x-api-key: []
tags:
- name: Consent
paths:
  /consent:
    post:
      tags:
      - Consent
      summary: Update consent
      description: Updates marketing consent information for multiple customers.
      operationId: update-consent
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/ConsentUpdateRequest'
            examples:
              Update consent request:
                description: Updates marketing consent information for multiple customers.
                value:
                - identifier_value: tyler@optimizely.com
                  identifier_field_name: email
                  consent: true
                  consent_update_reason: reason
                  consent_update_ts: ts
                - identifier_value: email
                  identifier_field_name: brian@optimizely.com
                  consent: false
                  consent_update_reason: reason
                  consent_update_ts: ts
        required: true
      responses:
        '202':
          description: Consent updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericUpdateResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                example: '{"title":"Bad Request","status":400,"timestamp":"2018-09-10T21:07:10-05:00","detail":{"invalids":[{"field":"delimiter","reason":"Unrecognized delimiter, valid options are comma, tab or pipe"}]}}'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                example: '{  "message": "Forbidden"}'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                example: '{"title":"Bad Request","status":404,"timestamp":"2018-09-10T21:07:10-05:00","detail":{"message":"Not found description"}}'
  /consent/{identifier_field_name}:
    get:
      tags:
      - Consent
      summary: Get consent
      description: Get marketing consent information for a customer.
      operationId: get-consent
      parameters:
      - name: identifier_field_name
        in: path
        description: the name of the field that this identifier falls under, such as email
        required: true
        schema:
          type: string
          description: the name of the field that this identifier falls under, such as email
          example: email
        example: email
      - name: id
        in: query
        description: the valid messaging identifier you are requesting, such as an email address
        required: true
        schema:
          type: string
          description: the valid messaging identifier you are requesting, such as an email address
          example: example@example.com
        example: example@example.com
      responses:
        '200':
          description: Consent information found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConsentGetResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                example: '{"title":"Bad Request","status":400,"timestamp":"2018-09-10T21:07:10-05:00","detail":{"invalids":[{"field":"delimiter","reason":"Unrecognized delimiter, valid options are comma, tab or pipe"}]}}'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                example: '{  "message": "Forbidden"}'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                example: '{"title":"Bad Request","status":404,"timestamp":"2018-09-10T21:07:10-05:00","detail":{"message":"Not found description"}}'
components:
  schemas:
    ConsentUpdateRequest:
      required:
      - consent
      - identifier_field_name
      - identifier_value
      type: object
      properties:
        identifier_field_name:
          type: string
          description: The name of the field that this identifier falls under, such as email
          example: email
        identifier_value:
          type: string
          description: The valid messaging identifier you are requesting, such as an email address
          example: example@example.com
        consent:
          type: boolean
          description: true/false indicator of whether a customer has provided consent to receive marketing messages on this identifier
          example: true
        consent_update_reason:
          type: string
          description: (optional) a reason for updating consent; can be any text value, for audit purposes
        consent_update_ts:
          type: integer
          description: (optional) a reason for updating consent; can be any text value, for audit purposes
          format: int64
        event_data:
          type: object
          additionalProperties:
            type: object
            description: (optional) object of key/value pairs, which are added to the generated events
            writeOnly: true
          description: (optional) object of key/value pairs, which are added to the generated events
          writeOnly: true
    ConsentGetResponse:
      required:
      - consent
      - identifier_field_name
      - identifier_value
      type: object
      properties:
        identifier_field_name:
          type: string
          description: The name of the field that this identifier falls under, such as email
          example: email
        identifier_value:
          type: string
          description: The valid messaging identifier you are requesting, such as an email address
          example: example@example.com
        consent:
          type: boolean
          description: true/false indicator of whether a customer has provided consent to receive marketing messages on this identifier
          example: true
        consent_update_reason:
          type: string
          description: (optional) a reason for updating consent; can be any text value, for audit purposes
        consent_update_ts:
          type: integer
          description: (optional) a reason for updating consent; can be any text value, for audit purposes
          format: int64
        zaius_id:
          type: integer
          description: (optional) a reason for updating consent; can be any text value, for audit purposes
          format: int64
          readOnly: true
        event_data:
          type: object
          additionalProperties:
            type: object
            description: (optional) object of key/value pairs, which are added to the generated events
            writeOnly: true
          description: (optional) object of key/value pairs, which are added to the generated events
          writeOnly: true
    GenericUpdateResponse:
      type: object
      properties:
        title:
          type: string
        status:
          type: integer
          format: int32
        timestamp:
          type: string
  securitySchemes:
    x-api-key:
      type: apiKey
      name: x-api-key
      in: header
x-readme:
  explorer-enabled: true
  proxy-enabled: true