Salsify Record Types API

The Record Types API from Salsify — 1 operation(s) for record types.

OpenAPI Specification

salsify-record-types-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: No API Explorer (for destructive calls & not well defined parameters) Record Types API
  version: '1.0'
servers:
- url: https://app.salsify.com/api/v1/orgs
security:
- sec0: []
tags:
- name: Record Types
paths:
  /{org_id}/record_types:
    get:
      summary: Read Record Types
      description: Used to query for all available record types.
      operationId: read-record-types
      parameters:
      - name: org_id
        in: path
        description: The Salsify organization's unique identifier. Visit your Salsify organization and pull from the URL path, immediately following /orgs/
        schema:
          type: string
        required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: "{\n    \"data\": [\n        {\n            \"salsify:id\": \"Products\",\n            \"salsify:name\": \"Products\",\n            \"salsify:created_at\": \"2021-09-03T14:42:49.970Z\",\n            \"salsify:updated_at\": \"2021-09-03T14:42:49.970Z\"\n        },\n        {\n            \"salsify:id\": \"Colors\",\n            \"salsify:name\": \"Colors\",\n            \"salsify:created_at\": \"2021-09-03T14:43:02.107Z\",\n            \"salsify:updated_at\": \"2021-09-03T14:43:02.107Z\"\n        }\n    ],\n    \"meta\": {\n        \"current_page\": 1,\n        \"per_page\": 30,\n        \"total_entries\": 2\n    }\n}"
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        salsify:id:
                          type: string
                          example: Products
                        salsify:name:
                          type: string
                          example: Products
                        salsify:created_at:
                          type: string
                          example: '2021-09-03T14:42:49.970Z'
                        salsify:updated_at:
                          type: string
                          example: '2021-09-03T14:42:49.970Z'
                  meta:
                    type: object
                    properties:
                      current_page:
                        type: integer
                        example: 1
                        default: 0
                      per_page:
                        type: integer
                        example: 30
                        default: 0
                      total_entries:
                        type: integer
                        example: 2
                        default: 0
        '400':
          description: '400'
          content:
            text/plain:
              examples:
                Result:
                  value: Returned when a request is malformed and cannot be found
      deprecated: false
      x-readme:
        code-samples:
        - language: curl
          code: "curl -X GET \\\n  https://app.salsify.com/api/v1/orgs/s-999-999-999-999/record_types \\\n  -H 'authorization: Bearer YOUR-AUTH-TOKEN'\n\n# where org_id = s-999-999-999-999, api_token = YOUR-AUTH-TOKEN"
        - language: ruby
          code: 'require ''uri''

            require ''net/http''


            url = URI("https://app.salsify.com/api/v1/orgs/s-999-999-999-999/record_types")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true

            http.verify_mode = OpenSSL::SSL::VERIFY_NONE


            request = Net::HTTP::Get.new(url)

            request["authorization"] = ''Bearer YOUR-AUTH-TOKEN''


            response = http.request(request)

            puts response.read_body


            # where org_id = s-999-999-999-999, api_token = YOUR-AUTH-TOKEN'
        - language: python
          code: "import http.client\n\nconn = http.client.HTTPSConnection(\"app.salsify.com\")\n\nheaders = {\n    'authorization': \"Bearer YOUR-AUTH-TOKEN\",\n    }\n\nconn.request(\"GET\", \"/api/v1/orgs/s-999-999-999-999/record_types\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))\n\n# where org_id = s-999-999-999-999, api_token = YOUR-AUTH-TOKEN"
        samples-languages:
        - curl
        - ruby
        - python
      tags:
      - Record Types
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: bearer
x-readme:
  headers:
  - key: Authorization
    value: Bearer {api_key}
x-readme-fauxas: true