Whiplash Merchandising templates API

Templates allow you to customize packing slips, email confirmations, order inserts, etc.

OpenAPI Specification

whiplash-merchandising-templates-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  version: '2.0'
  title: Rydership bundle_items templates API
  description: 'The Rydership V2 API is open by invite only. Fill out request form <a href="https://help.whiplash.com/hc/en-us/requests/new?ticket_form_id=360001303092"> here</a>.

    <br>

    <a href="api.v2.html">V2 documentation</a>

    <br>

    <a href="api.v2-1.html">V2.1 documentation</a>

    '
  contact:
    name: Rydership Development Team
    email: tech@whiplash.com
    url: https://www.getwhiplash.com
  x-logo:
    url: https://wl-s3-assets.s3.amazonaws.com/rydership/RyderShip-horizontal-safe-padding.svg
    backgroundColor: '#FFFFFF'
    altText: RyderShip
servers:
- url: ''
  description: Base Path
tags:
- name: templates
  description: Templates allow you to customize packing slips, email confirmations, order inserts, etc.
paths:
  /api/v2/templates:
    get:
      operationId: GetApiV2Templates
      tags:
      - templates
      summary: List all templates
      description: Get a list of templates
      parameters:
      - name: search
        in: query
        required: false
        schema:
          type: string
          description: 'JSON search string like {"attribute_eq": "Term"}'
      - name: page
        in: query
        required: false
        schema:
          type: integer
          format: int32
          description: Page of results to fetch
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
          format: int32
          description: Number of results to return per page
      - name: page_total
        in: query
        required: false
        schema:
          type: boolean
          description: Include total count of results
      - name: page_links
        in: query
        required: false
        schema:
          type: boolean
          description: Include prev/next links in response headers
      responses:
        '200':
          description: Get a list of templates
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ApiV2EntitiesTemplate'
              examples: null
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiSharedEntitiesApiError'
        '403':
          description: forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiSharedEntitiesApiError'
    post:
      operationId: PostApiV2Templates
      tags:
      - templates
      summary: Create a template
      description: Create a template
      parameters: []
      responses:
        '201':
          description: Create a template
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiV2EntitiesTemplate'
              examples: null
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiSharedEntitiesApiError'
        '403':
          description: forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiSharedEntitiesApiError'
        '409':
          description: conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiSharedEntitiesApiError'
        '422':
          description: unprocessable_entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiSharedEntitiesApiError'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostApiV2TemplatesRequest'
  /api/v2/templates/{id}:
    get:
      operationId: GetApiV2TemplatesId
      tags:
      - templates
      summary: Retrieve a template
      description: Get a template
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Get a template
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiV2EntitiesTemplate'
              examples: null
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiSharedEntitiesApiError'
        '403':
          description: forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiSharedEntitiesApiError'
    put:
      operationId: PutApiV2TemplatesId
      tags:
      - templates
      summary: Update a template
      description: Update a template
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Update a template
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiV2EntitiesTemplate'
              examples: null
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiSharedEntitiesApiError'
        '403':
          description: forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiSharedEntitiesApiError'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PutApiV2TemplatesIdRequest'
    delete:
      operationId: DeleteApiV2TemplatesId
      tags:
      - templates
      summary: Destroy a template
      description: Destroy a template
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '204':
          description: Successfully deleted
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiSharedEntitiesApiError'
        '403':
          description: forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiSharedEntitiesApiError'
        '422':
          description: unprocessable_entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiSharedEntitiesApiError'
components:
  schemas:
    PutApiV2TemplatesIdRequest:
      type: object
      properties:
        name:
          type: string
          description: Name of the template
        content:
          type: string
          description: Content of the template
        size:
          type: string
          description: the template size
    ApiSharedEntitiesApiError:
      type: object
      title: Shared
      properties:
        message:
          type: string
          description: error message
      additionalProperties: false
    ApiV2EntitiesTemplate:
      type: object
      title: V2
      properties:
        id:
          type: integer
          format: int32
          description: id of the template
        name:
          type:
          - string
          - 'null'
          description: Name of the template
        template_type_id:
          type:
          - integer
          - 'null'
          format: int32
          description: ID of the template type
        content:
          type:
          - string
          - 'null'
          description: Content of the template
        customer_id:
          type:
          - integer
          - 'null'
          format: int32
          description: Whiplash Customer ID
        default:
          type:
          - boolean
          - 'null'
          description: Is the default template
        customizable:
          type:
          - boolean
          - 'null'
          description: Template is customizable
        url:
          type: string
          description: URL to fetch the rendered template content
        created_at:
          type: string
          format: date-time
          description: the template creation date and time
        updated_at:
          type: string
          format: date-time
          description: the template last update date and time
        slug:
          type: string
          description: the template type slug
        size:
          type:
          - string
          - 'null'
          description: the template size
        valid_sizes:
          type: array
          items:
            type: string
        template_type:
          $ref: '#/components/schemas/ApiV2EntitiesTemplateType'
      additionalProperties: false
    PostApiV2TemplatesRequest:
      type: object
      properties:
        name:
          type: string
          description: Name of the template
        template_type_id:
          type: integer
          format: int32
          description: ID of the template type
        content:
          type: string
          description: Content of the template
        size:
          type: string
          description: the template size
        default:
          type: boolean
          description: Is the default template
      required:
      - name
      - template_type_id
      - content
    ApiV2EntitiesTemplateType:
      type: object
      title: V2
      properties:
        id:
          type: integer
          format: int32
          description: id of the template type
        name:
          type:
          - string
          - 'null'
          description: Name of the template type
        display_name:
          type: string
          description: Descriptive name of the template type
        slug:
          type:
          - integer
          - 'null'
          format: int32
          description: url-friendly name
        resource_type:
          type:
          - string
          - 'null'
          description: Which resource type these templates are associated with
        format:
          type:
          - string
          - 'null'
          description: Mimetype / File extention
        accessibility:
          type:
          - string
          - 'null'
          description: Who has what access
        valid_sizes:
          type: array
          items:
            type: string
        created_at:
          type: string
          format: date-time
          description: the template type creation date and time
        updated_at:
          type: string
          format: date-time
          description: the template last type update date and time
      additionalProperties: false