Newstore Reason Codes API

Reason Codes API.

Operations 5

GET /promotions/reason-codes listReasonCodes #
POST /promotions/reason-codes createReasonCode #
DELETE /promotions/reason-codes/{code} destroyReasonCode #
GET /promotions/reason-codes/{code} showReasonCode #
PATCH /promotions/reason-codes/{code} updateReasonCode #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/newstore-reason-codes-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

newstore-reason-codes-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: '1.0'
  title: NewStore Reason Codes API
  description: NewStore public APIs
  contact:
    email: support@newstore.com
    name: NewStore API Support
    url: https://developer.newstore.com
servers:
- url: https://dodici-demo.p.newstore.net/
security: []
tags:
- name: Reason Codes
  description: Reason Codes API.
paths:
  /promotions/reason-codes:
    get:
      description: Retrieves reason codes per locale
      summary: listReasonCodes
      tags:
      - Reason Codes
      operationId: listReasonCodes
      deprecated: false
      parameters:
      - name: Accept-Language
        in: header
        required: false
        description: The locale of reason codes. if not present all codes from all locales are returned.
        schema:
          type: string
      - name: feature
        in: query
        required: false
        description: Indicates the feature of the reason code.
        schema:
          type: string
          enum:
          - DISCOUNT
          - OVERRIDE
          default: DISCOUNT
      responses:
        default:
          description: Error response
          headers: {}
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
        '200':
          description: Retrieves reason codes per locale
          headers: {}
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ListResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ListResponse'
        '400':
          description: Locale does not match regex
          headers: {}
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
        '401':
          description: Unauthorized request
          headers: {}
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
        '403':
          description: Forbidden request
          headers: {}
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          description: When no reason codes exist for the tenant or for the given locale
          headers: {}
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
        '429':
          description: Too Many Requests
          headers:
            Retry-After:
              schema:
                type: string
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
        '500':
          description: Internal server error
          headers: {}
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
        '502':
          description: Bad Gateway
          headers: {}
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
        '503':
          description: Service Unavailable
          headers: {}
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
      security:
      - oauth:
        - promotions:reason-codes:read
    post:
      description: Creates a new reason code
      summary: createReasonCode
      tags:
      - Reason Codes
      operationId: createReasonCode
      deprecated: false
      parameters:
      - name: Content-Type
        in: header
        required: false
        description: ''
        schema:
          type: string
          enum:
          - application/json
      - name: Accept-Language
        in: header
        required: false
        description: The locale that the reasons codes belong to.
        schema:
          type: string
          default: en-US
      - name: feature
        in: query
        required: false
        description: Indicates the feature of the reason code.
        schema:
          type: string
          enum:
          - DISCOUNT
          - OVERRIDE
          default: DISCOUNT
      responses:
        default:
          description: Error response
          headers: {}
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '201':
          description: Reason code was created
          headers: {}
        '400':
          description: Bad request
          headers: {}
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '401':
          description: Unauthorized request
          headers: {}
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '403':
          description: Forbidden request
          headers: {}
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '409':
          description: Reason code already exist
          headers: {}
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '429':
          description: Too Many Requests
          headers:
            Retry-After:
              schema:
                type: string
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '500':
          description: Internal server error
          headers: {}
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '502':
          description: Bad Gateway
          headers: {}
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '503':
          description: Service Unavailable
          headers: {}
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
      security:
      - oauth:
        - promotions:reason-codes:write
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReasonCodeInit'
        required: true
  /promotions/reason-codes/{code}:
    delete:
      description: Delete a reason code
      summary: destroyReasonCode
      tags:
      - Reason Codes
      operationId: destroyReasonCode
      deprecated: false
      parameters:
      - name: code
        in: path
        required: true
        description: An identifier of a reason code.
        schema:
          type: string
          maxLength: 256
      - name: Accept-Language
        in: header
        required: false
        description: The locale of the reason code.
        schema:
          type: string
          default: en-US
      - name: feature
        in: query
        required: false
        description: Indicates the feature of the reason code.
        schema:
          type: string
          enum:
          - DISCOUNT
          - OVERRIDE
          default: DISCOUNT
      responses:
        default:
          description: Error response
          headers: {}
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '204':
          description: The reason code was deleted.
          headers: {}
        '401':
          description: Unauthorized request
          headers: {}
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '403':
          description: Forbidden request
          headers: {}
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          description: Reason code does not exist
          headers: {}
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '429':
          description: Too Many Requests
          headers:
            Retry-After:
              schema:
                type: string
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '500':
          description: Internal server error
          headers: {}
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '502':
          description: Bad Gateway
          headers: {}
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '503':
          description: Service Unavailable
          headers: {}
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
      security:
      - oauth:
        - promotions:reason-codes:write
    get:
      description: Retrieves a reason code with all localisations
      summary: showReasonCode
      tags:
      - Reason Codes
      operationId: showReasonCode
      deprecated: false
      parameters:
      - name: code
        in: path
        required: true
        description: An identifier of a reason code.
        schema:
          type: string
          maxLength: 256
      - name: feature
        in: query
        required: false
        description: Indicates the feature of the reason code.
        schema:
          type: string
          enum:
          - DISCOUNT
          - OVERRIDE
          default: DISCOUNT
      responses:
        default:
          description: Error response
          headers: {}
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
        '200':
          description: Retrieves reason code with all localisations
          headers: {}
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/GetResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/GetResponse'
        '401':
          description: Unauthorized request
          headers: {}
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
        '403':
          description: Forbidden request
          headers: {}
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          description: Reason code does not exist
          headers: {}
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
        '429':
          description: Too Many Requests
          headers:
            Retry-After:
              schema:
                type: string
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
        '500':
          description: Internal server error
          headers: {}
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
        '502':
          description: Bad Gateway
          headers: {}
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
        '503':
          description: Service Unavailable
          headers: {}
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
      security:
      - oauth:
        - promotions:reason-codes:read
    patch:
      description: Update the name of the reason code.
      summary: updateReasonCode
      tags:
      - Reason Codes
      operationId: updateReasonCode
      deprecated: false
      parameters:
      - name: code
        in: path
        required: true
        description: An identifier of a reason code.
        schema:
          type: string
          maxLength: 256
      - name: Content-Type
        in: header
        required: false
        description: ''
        schema:
          type: string
          enum:
          - application/json
      - name: Accept-Language
        in: header
        required: false
        description: The locale of the reason code.
        schema:
          type: string
          default: en-US
      - name: feature
        in: query
        required: false
        description: Indicates the feature of the reason code.
        schema:
          type: string
          enum:
          - DISCOUNT
          - OVERRIDE
          default: DISCOUNT
      responses:
        default:
          description: Error response
          headers: {}
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '204':
          description: The reason code was updated.
          headers: {}
        '400':
          description: Bad request
          headers: {}
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '401':
          description: Unauthorized request
          headers: {}
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '403':
          description: Forbidden request
          headers: {}
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          description: Reason code does not exist
          headers: {}
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '429':
          description: Too Many Requests
          headers:
            Retry-After:
              schema:
                type: string
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '500':
          description: Internal server error
          headers: {}
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '502':
          description: Bad Gateway
          headers: {}
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '503':
          description: Service Unavailable
          headers: {}
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
      security:
      - oauth:
        - promotions:reason-codes:write
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReasonCodePatch'
components:
  schemas:
    Localization:
      title: Localization
      example:
        locale: en-us
        name: defect
      type: object
      properties:
        locale:
          description: The locale of the reason code, pattern is '(^[a-z]{2}-[A-Za-z]{2}$)'
          type: string
        name:
          description: The name of the reason code.
          type: string
      required:
      - locale
      - name
    LocalizedReasonCode:
      title: LocalizedReasonCode
      example:
        code: DFT
        locale: en-us
        name: defect
      type: object
      properties:
        code:
          description: An identifier of the reason code, pattern is '^[^+=%]+$'
          type: string
          maxLength: 256
        locale:
          description: The locale of the reason code, pattern is '(^[a-z]{2}-[A-Za-z]{2}$)'
          type: string
        name:
          type: string
      required:
      - code
      - locale
      - name
    ReasonCodePatch:
      title: ReasonCodePatch
      example:
        name: defect
      type: object
      properties:
        name:
          description: The name of the reason code.
          type: string
      required:
      - name
    ListResponse:
      title: ListResponse
      type: object
      properties:
        codes:
          type: array
          items:
            $ref: '#/components/schemas/LocalizedReasonCode'
      required:
      - codes
    ReasonCodeInit:
      title: ReasonCodeInit
      example:
        code: DFT
        name: defect
      type: object
      properties:
        code:
          description: An identifier of the reason code, pattern is '^[^+=%]+$'
          type: string
          maxLength: 256
        name:
          description: The name of the reason code.
          type: string
      required:
      - code
      - name
    Problem:
      title: Problem
      type: object
      properties:
        detail:
          description: A human readable explanation specific to this occurrence of the problem that is helpful to locate the problem and give advice on how to proceed. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized.
          example: some description for the error situation
          type: string
        error_code:
          type: string
        instance:
          description: A URI reference that identifies the specific occurrence of the problem, e.g. by adding a fragment identifier or sub-path to the problem type. May be used to locate the root of this problem in the source code.
          example: /some/uri-reference#specific-occurrence-context
          type: string
        message:
          type: string
        messages:
          type: array
          items:
            type: string
        request_id:
          type: string
        status:
          description: The HTTP status code generated by the origin server for this occurrence of the problem.
          type: integer
          minimum: 100.0
          format: int32
          exclusiveMaximum: 600.0
        title:
          description: A short summary of the problem type. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized.
          example: some title for the error situation
          type: string
        type:
          description: A URI reference that uniquely identifies the problem type only in the context of the provided API. Opposed to the specification in RFC-7807, it is neither recommended to be dereferenceable and point to a human-readable documentation nor globally unique for the problem type.
          example: /some/uri-reference
          type: string
          default: about:blank
    GetResponse:
      title: GetResponse
      type: object
      properties:
        code:
          description: An identifier of the reason code, pattern is '^[^+=%]+$'
          type: string
          maxLength: 256
        localizations:
          type: array
          items:
            $ref: '#/components/schemas/Localization'
      required:
      - code
      - localizations
  securitySchemes:
    oauth:
      type: oauth2
      flows:
        clientCredentials:
          scopes:
            catalog:import-schemas:read: Grants privileges to read import schema
            catalog:import-schemas:write: Grants privileges to write import schema
            catalog:pricebook-export:read: Grants privileges to export pricebook data
            catalog:product-export:read: Grants privileges to export product data
            checkout:carts:read: Grants privileges to read cart data
            checkout:carts:write: Grants privileges to write cart data
            clienteling:profile:read: Grants privileges to read clienteling profiles
            customer:profile:read: Grants privileges to read API customer data
            customer:profile:write: Grants privileges to modify API customer data
            newstore:configuration:read: Grants privileges to read configuration
            newstore:configuration:write: Grants privileges to write configuration
            fiscalization:orders:read: View orders with fiscal transactions and signatures
            fiscalization:orders:write: Create orders with fiscal transactions and signatures
            shipments:read: Read Shipping Options and Audits
            iam:providers:read: ' Grants read privileges to provider resources'
            iam:providers:write: ' Grants write privileges to provider resources'
            iam:roles:read: ' Grants privileges to read roles data'
            iam:roles:write: ' Grants privileges to write roles data'
            iam:users:read: ' Grants privileges to read user data'
            iam:users:write: ' Grants privileges to write user data'
            inventory:reservations:read: Allows access to retrieve reservations
            inventory:reservations:write: Allows access to create and update reservations
            promotions:config:read: Grants privileges to read configuration
            promotions:config:write: Grants privileges to write into configuration
            promotions:reason-codes:read: Grants privileges to list reason codes
            promotions:reason-codes:write: Grants privileges to create and update reason codes
            audit-events:read: Grants read access to the tenant's audit events.
            taxes:preview-transactions:write: Preview tax transactions
            taxes:transactions:read: Read tax transactions
          tokenUrl: https://id.p.newstore.net/auth/realms/dodici-demo/protocol/openid-connect/token