Makeswift locale API

The locale API from Makeswift — 3 operation(s) for locale.

OpenAPI Specification

makeswift-locale-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: REST locale API
  version: 1.0.0
servers:
- url: https://api.makeswift.com
  description: Production server
tags:
- name: locale
paths:
  /v2/locales:
    post:
      operationId: SiteLocaleController_createV2_v2
      summary: Create Locale
      description: Creates a new locale for a site.
      tags:
      - locale
      parameters:
      - name: x-api-key
        in: header
        description: 'API key authentication. Accepts either:

          - App API key (e.g. sk_eczMHVBY9fV6GYFhvs53qcnxq7yptlXL3ABKOZtn6dQ)

          - Site API key (UUID format, e.g. 550e8400-e29b-41d4-a716-446655440000)'
        required: true
        schema:
          type: string
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateSiteLocaleV2ResponseBodyDto'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponseDto'
        '403':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponseDto'
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponseDto'
        '409':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictResponseDto'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSiteLocaleV2RequestBodyDto'
    get:
      operationId: SiteLocaleController_listV2_v2
      summary: List Locales
      description: Returns a list of locales for a site.
      tags:
      - locale
      parameters:
      - name: siteId
        in: query
        description: The site ID to list locales from.
        required: true
        schema:
          type: string
          format: uuid
      - name: limit
        in: query
        description: The maximum number of locales to return.
        required: false
        schema:
          type: number
          format: double
          default: 20
      - name: startingAfter
        in: query
        description: The pagination cursor. This is used to indicate what ID to list from.
        required: false
        schema:
          type: string
          format: uuid
      - name: x-api-key
        in: header
        description: 'API key authentication. Accepts either:

          - App API key (e.g. sk_eczMHVBY9fV6GYFhvs53qcnxq7yptlXL3ABKOZtn6dQ)

          - Site API key (UUID format, e.g. 550e8400-e29b-41d4-a716-446655440000)'
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListSiteLocaleV2ResponseBodyDto'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponseDto'
        '403':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponseDto'
  /v2/locales/{localeIdOrCode}:
    get:
      operationId: SiteLocaleController_getV2_v2
      summary: Get Locale
      description: Returns a locale by its ID or locale code.
      tags:
      - locale
      parameters:
      - name: localeIdOrCode
        in: path
        description: The locale ID or locale code.
        required: true
        schema:
          type: string
      - name: siteId
        in: query
        description: The site ID required when using a locale code instead of a locale ID.
        required: false
        schema:
          type: string
          format: uuid
      - name: x-api-key
        in: header
        description: 'API key authentication. Accepts either:

          - App API key (e.g. sk_eczMHVBY9fV6GYFhvs53qcnxq7yptlXL3ABKOZtn6dQ)

          - Site API key (UUID format, e.g. 550e8400-e29b-41d4-a716-446655440000)'
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReadSiteLocaleV2ResponseBodyDto'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponseDto'
        '403':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponseDto'
    patch:
      operationId: SiteLocaleController_updateV2_v2
      summary: Update Locale
      description: Updates an existing locale.
      tags:
      - locale
      parameters:
      - name: localeIdOrCode
        in: path
        description: The locale ID or locale code.
        required: true
        schema:
          type: string
      - name: siteId
        in: query
        description: The site ID required when using a locale code instead of a locale ID.
        required: false
        schema:
          type: string
          format: uuid
      - name: x-api-key
        in: header
        description: 'API key authentication. Accepts either:

          - App API key (e.g. sk_eczMHVBY9fV6GYFhvs53qcnxq7yptlXL3ABKOZtn6dQ)

          - Site API key (UUID format, e.g. 550e8400-e29b-41d4-a716-446655440000)'
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateSiteLocaleV2ResponseBodyDto'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponseDto'
        '403':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponseDto'
        '409':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictResponseDto'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSiteLocaleV2RequestBodyDto'
    delete:
      operationId: SiteLocaleController_deleteV2_v2
      summary: Delete Locale
      description: Deletes a locale.
      tags:
      - locale
      parameters:
      - name: localeIdOrCode
        in: path
        description: The locale ID or locale code.
        required: true
        schema:
          type: string
      - name: siteId
        in: query
        description: The site ID required when using a locale code instead of a locale ID.
        required: false
        schema:
          type: string
          format: uuid
      - name: x-api-key
        in: header
        description: 'API key authentication. Accepts either:

          - App API key (e.g. sk_eczMHVBY9fV6GYFhvs53qcnxq7yptlXL3ABKOZtn6dQ)

          - Site API key (UUID format, e.g. 550e8400-e29b-41d4-a716-446655440000)'
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Locale successfully deleted.
          content:
            application/json:
              schema:
                type: object
                properties: {}
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponseDto'
        '403':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponseDto'
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponseDto'
  /v2/locales/{localeIdOrCode}/restore:
    post:
      operationId: SiteLocaleController_restoreV2_v2
      summary: Restore Locale
      description: Restores a previously deleted locale.
      tags:
      - locale
      parameters:
      - name: localeIdOrCode
        in: path
        description: The locale ID or locale code.
        required: true
        schema:
          type: string
      - name: siteId
        in: query
        description: The site ID required when using a locale code instead of a locale ID.
        required: false
        schema:
          type: string
          format: uuid
      - name: x-api-key
        in: header
        description: 'API key authentication. Accepts either:

          - App API key (e.g. sk_eczMHVBY9fV6GYFhvs53qcnxq7yptlXL3ABKOZtn6dQ)

          - Site API key (UUID format, e.g. 550e8400-e29b-41d4-a716-446655440000)'
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Locale successfully restored.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestoreSiteLocaleV2ResponseBodyDto'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponseDto'
        '403':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponseDto'
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponseDto'
        '409':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictResponseDto'
components:
  schemas:
    UpdateSiteLocaleV2ResponseBodyDtoObject:
      type: string
      enum:
      - locale
      title: UpdateSiteLocaleV2ResponseBodyDtoObject
    ConflictResponseDtoCode:
      type: string
      enum:
      - conflict
      title: ConflictResponseDtoCode
    BadRequestResponseDtoCode:
      type: string
      enum:
      - bad_request
      title: BadRequestResponseDtoCode
    ForbiddenResponseDtoObject:
      type: string
      enum:
      - error
      title: ForbiddenResponseDtoObject
    ForbiddenResponseDtoCode:
      type: string
      enum:
      - forbidden
      title: ForbiddenResponseDtoCode
    CreateSiteLocaleV2ResponseBodyDto:
      type: object
      properties:
        object:
          $ref: '#/components/schemas/CreateSiteLocaleV2ResponseBodyDtoObject'
        id:
          type: string
          format: uuid
          description: The ID of the created locale.
        locale:
          type: string
          description: We support the subset of locales specified with ISO 3166 that are composed of language and optionally a region.
        domain:
          type:
          - string
          - 'null'
          format: uri
          description: The domain URL for domain-based localization.
        pathPrefix:
          type:
          - string
          - 'null'
          description: Custom URL path prefix. Null means the locale code is used as the default prefix.
        isDefault:
          type: boolean
          description: The flag that indicates whether this locale is the default locale for the site.
      required:
      - object
      - id
      - locale
      - domain
      - pathPrefix
      - isDefault
      title: CreateSiteLocaleV2ResponseBodyDto
    ListSiteLocaleV2ResponseBodyDtoDataItemsObject:
      type: string
      enum:
      - locale
      title: ListSiteLocaleV2ResponseBodyDtoDataItemsObject
    BadRequestResponseDto:
      type: object
      properties:
        object:
          $ref: '#/components/schemas/BadRequestResponseDtoObject'
        code:
          $ref: '#/components/schemas/BadRequestResponseDtoCode'
        message:
          type: string
      required:
      - object
      - code
      - message
      title: BadRequestResponseDto
    ListSiteLocaleV2ResponseBodyDto:
      type: object
      properties:
        object:
          $ref: '#/components/schemas/ListSiteLocaleV2ResponseBodyDtoObject'
        data:
          type: array
          items:
            $ref: '#/components/schemas/ListSiteLocaleV2ResponseBodyDtoDataItems'
        hasMore:
          type: boolean
          description: The flag that indicates whether there are more locales available.
      required:
      - object
      - data
      - hasMore
      title: ListSiteLocaleV2ResponseBodyDto
    ConflictResponseDto:
      type: object
      properties:
        object:
          $ref: '#/components/schemas/ConflictResponseDtoObject'
        code:
          $ref: '#/components/schemas/ConflictResponseDtoCode'
        message:
          type: string
      required:
      - object
      - code
      - message
      title: ConflictResponseDto
    RestoreSiteLocaleV2ResponseBodyDto:
      type: object
      properties:
        object:
          $ref: '#/components/schemas/RestoreSiteLocaleV2ResponseBodyDtoObject'
        id:
          type: string
          format: uuid
          description: The ID of the restored locale.
        locale:
          type: string
          description: We support the subset of locales specified with ISO 3166 that are composed of language and optionally a region.
        domain:
          type:
          - string
          - 'null'
          format: uri
          description: The domain URL for domain-based localization.
        pathPrefix:
          type:
          - string
          - 'null'
          description: Custom URL path prefix. Null means the locale code is used as the default prefix.
        isDefault:
          type: boolean
          description: The flag that indicates whether this locale is the default locale for the site.
      required:
      - object
      - id
      - locale
      - domain
      - pathPrefix
      - isDefault
      title: RestoreSiteLocaleV2ResponseBodyDto
    CreateSiteLocaleV2RequestBodyDto:
      type: object
      properties:
        siteId:
          type: string
          format: uuid
          description: The site ID to create the locale for.
        locale:
          type: string
          description: Locale of the site locale.
        domain:
          type: string
          format: uri
          description: The domain URL for domain-based localization. This URL must include the protocol.
      required:
      - siteId
      - locale
      title: CreateSiteLocaleV2RequestBodyDto
    NotFoundResponseDtoObject:
      type: string
      enum:
      - error
      title: NotFoundResponseDtoObject
    NotFoundResponseDtoCode:
      type: string
      enum:
      - not_found
      title: NotFoundResponseDtoCode
    UpdateSiteLocaleV2RequestBodyDto:
      type: object
      properties:
        locale:
          type: string
          description: Locale of the site locale.
        domain:
          type:
          - string
          - 'null'
          format: uri
          description: The domain URL for domain-based localization. This URL must include the protocol.
      title: UpdateSiteLocaleV2RequestBodyDto
    UpdateSiteLocaleV2ResponseBodyDto:
      type: object
      properties:
        object:
          $ref: '#/components/schemas/UpdateSiteLocaleV2ResponseBodyDtoObject'
        id:
          type: string
          format: uuid
          description: The ID of the updated locale.
        locale:
          type: string
          description: We support the subset of locales specified with ISO 3166 that are composed of language and optionally a region.
        domain:
          type:
          - string
          - 'null'
          format: uri
          description: The domain URL for domain-based localization.
        pathPrefix:
          type:
          - string
          - 'null'
          description: Custom URL path prefix. Null means the locale code is used as the default prefix.
        isDefault:
          type: boolean
          description: The flag that indicates whether this locale is the default locale for the site.
      required:
      - object
      - id
      - locale
      - domain
      - pathPrefix
      - isDefault
      title: UpdateSiteLocaleV2ResponseBodyDto
    ConflictResponseDtoObject:
      type: string
      enum:
      - error
      title: ConflictResponseDtoObject
    ForbiddenResponseDto:
      type: object
      properties:
        object:
          $ref: '#/components/schemas/ForbiddenResponseDtoObject'
        code:
          $ref: '#/components/schemas/ForbiddenResponseDtoCode'
        message:
          type: string
      required:
      - object
      - code
      - message
      title: ForbiddenResponseDto
    CreateSiteLocaleV2ResponseBodyDtoObject:
      type: string
      enum:
      - locale
      title: CreateSiteLocaleV2ResponseBodyDtoObject
    ReadSiteLocaleV2ResponseBodyDto:
      type: object
      properties:
        object:
          $ref: '#/components/schemas/ReadSiteLocaleV2ResponseBodyDtoObject'
        id:
          type:
          - string
          - 'null'
          format: uuid
          description: The ID of the locale you are getting.
        locale:
          type: string
          description: We support the subset of locales specified with ISO 3166 that are composed of language and optionally a region.
        domain:
          type:
          - string
          - 'null'
          format: uri
          description: The domain URL for domain-based localization.
        pathPrefix:
          type:
          - string
          - 'null'
          description: Custom URL path prefix. Null means the locale code is used as the default prefix.
        isDefault:
          type: boolean
          description: The flag that indicates whether this locale is the default locale for the site.
      required:
      - object
      - id
      - locale
      - domain
      - pathPrefix
      - isDefault
      title: ReadSiteLocaleV2ResponseBodyDto
    RestoreSiteLocaleV2ResponseBodyDtoObject:
      type: string
      enum:
      - locale
      title: RestoreSiteLocaleV2ResponseBodyDtoObject
    NotFoundResponseDto:
      type: object
      properties:
        object:
          $ref: '#/components/schemas/NotFoundResponseDtoObject'
        code:
          $ref: '#/components/schemas/NotFoundResponseDtoCode'
        message:
          type: string
      required:
      - object
      - code
      - message
      title: NotFoundResponseDto
    ReadSiteLocaleV2ResponseBodyDtoObject:
      type: string
      enum:
      - locale
      title: ReadSiteLocaleV2ResponseBodyDtoObject
    BadRequestResponseDtoObject:
      type: string
      enum:
      - error
      title: BadRequestResponseDtoObject
    ListSiteLocaleV2ResponseBodyDtoDataItems:
      type: object
      properties:
        object:
          $ref: '#/components/schemas/ListSiteLocaleV2ResponseBodyDtoDataItemsObject'
        id:
          type:
          - string
          - 'null'
          format: uuid
          description: The ID of the locale you are getting.
        locale:
          type: string
          description: We support the subset of locales specified with ISO 3166 that are composed of language and optionally a region.
        domain:
          type:
          - string
          - 'null'
          format: uri
          description: The domain URL for domain-based localization.
        pathPrefix:
          type:
          - string
          - 'null'
          description: Custom URL path prefix. Null means the locale code is used as the default prefix.
        isDefault:
          type: boolean
          description: The flag that indicates whether this locale is the default locale for the site.
      required:
      - object
      - id
      - locale
      - domain
      - pathPrefix
      - isDefault
      title: ListSiteLocaleV2ResponseBodyDtoDataItems
    ListSiteLocaleV2ResponseBodyDtoObject:
      type: string
      enum:
      - list
      title: ListSiteLocaleV2ResponseBodyDtoObject
  securitySchemes:
    Authentication:
      type: apiKey
      in: header
      name: x-api-key
      description: 'API key authentication. Accepts either:

        - App API key (e.g. sk_eczMHVBY9fV6GYFhvs53qcnxq7yptlXL3ABKOZtn6dQ)

        - Site API key (UUID format, e.g. 550e8400-e29b-41d4-a716-446655440000)'