iOS

iOS InAppPurchaseOfferCodes API

The InAppPurchaseOfferCodes API from iOS — 8 operation(s) for inapppurchaseoffercodes.

OpenAPI Specification

ios-inapppurchaseoffercodes-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: App Store Connect AccessibilityDeclarations InAppPurchaseOfferCodes API
  version: 4.3.1
  x-platforms:
    app_store_connect_api: App Store Connect API
  description: The App Store Connect API is the standards-based REST API Apple provides to automate tasks across App Store Connect, Xcode, and Certificates, Identifiers & Profiles. It covers apps, builds, TestFlight, in-app purchases, subscriptions, Game Center, Xcode Cloud, provisioning, pricing and availability, and the full reporting surface (analytics, sales and trends, financial reports, power and performance). This spec is the official OpenAPI 3.0 document published by Apple at https://developer.apple.com/app-store-connect/api/ — mirrored here unmodified except for title-cased operation summaries.
servers:
- url: https://api.appstoreconnect.apple.com/
security:
- itc-bearer-token: []
tags:
- name: InAppPurchaseOfferCodes
paths:
  /v1/inAppPurchaseOfferCodes:
    post:
      tags:
      - InAppPurchaseOfferCodes
      operationId: inAppPurchaseOfferCodes_createInstance
      requestBody:
        description: InAppPurchaseOfferCode representation
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InAppPurchaseOfferCodeCreateRequest'
        required: true
      responses:
        '400':
          description: Parameter error(s)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized error(s)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Unprocessable request entity error(s)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '201':
          description: Single InAppPurchaseOfferCode
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InAppPurchaseOfferCodeResponse'
        '409':
          description: Request entity error(s)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      summary: Create in App Purchase Offer Codes
  /v1/inAppPurchaseOfferCodes/{id}:
    parameters:
    - name: id
      in: path
      description: the id of the requested resource
      schema:
        type: string
      style: simple
      required: true
    get:
      tags:
      - InAppPurchaseOfferCodes
      operationId: inAppPurchaseOfferCodes_getInstance
      parameters:
      - name: fields[inAppPurchaseOfferCodes]
        in: query
        description: the fields to include for returned resources of type inAppPurchaseOfferCodes
        schema:
          type: array
          items:
            type: string
            enum:
            - name
            - customerEligibilities
            - productionCodeCount
            - sandboxCodeCount
            - active
            - oneTimeUseCodes
            - customCodes
            - prices
        style: form
        explode: false
        required: false
      - name: fields[inAppPurchaseOfferCodeOneTimeUseCodes]
        in: query
        description: the fields to include for returned resources of type inAppPurchaseOfferCodeOneTimeUseCodes
        schema:
          type: array
          items:
            type: string
            enum:
            - numberOfCodes
            - createdDate
            - expirationDate
            - active
            - environment
            - values
            - createdByActor
            - deactivatedByActor
        style: form
        explode: false
        required: false
      - name: fields[inAppPurchaseOfferCodeCustomCodes]
        in: query
        description: the fields to include for returned resources of type inAppPurchaseOfferCodeCustomCodes
        schema:
          type: array
          items:
            type: string
            enum:
            - customCode
            - numberOfCodes
            - createdDate
            - expirationDate
            - active
            - createdByActor
            - deactivatedByActor
        style: form
        explode: false
        required: false
      - name: fields[inAppPurchaseOfferPrices]
        in: query
        description: the fields to include for returned resources of type inAppPurchaseOfferPrices
        schema:
          type: array
          items:
            type: string
            enum:
            - territory
            - pricePoint
        style: form
        explode: false
        required: false
      - name: include
        in: query
        description: comma-separated list of relationships to include
        schema:
          type: array
          items:
            type: string
            enum:
            - oneTimeUseCodes
            - customCodes
            - prices
        style: form
        explode: false
        required: false
      - name: limit[customCodes]
        in: query
        description: maximum number of related customCodes returned (when they are included)
        schema:
          type: integer
          maximum: 50
        style: form
        required: false
      - name: limit[oneTimeUseCodes]
        in: query
        description: maximum number of related oneTimeUseCodes returned (when they are included)
        schema:
          type: integer
          maximum: 50
        style: form
        required: false
      - name: limit[prices]
        in: query
        description: maximum number of related prices returned (when they are included)
        schema:
          type: integer
          maximum: 50
        style: form
        required: false
      responses:
        '400':
          description: Parameter error(s)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized error(s)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '200':
          description: Single InAppPurchaseOfferCode
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InAppPurchaseOfferCodeResponse'
        '429':
          description: Rate limit exceeded error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      summary: Get in App Purchase Offer Codes
    patch:
      tags:
      - InAppPurchaseOfferCodes
      operationId: inAppPurchaseOfferCodes_updateInstance
      requestBody:
        description: InAppPurchaseOfferCode representation
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InAppPurchaseOfferCodeUpdateRequest'
        required: true
      responses:
        '400':
          description: Parameter error(s)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized error(s)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Unprocessable request entity error(s)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '200':
          description: Single InAppPurchaseOfferCode
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InAppPurchaseOfferCodeResponse'
        '409':
          description: Request entity error(s)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      summary: Update in App Purchase Offer Codes
  /v1/inAppPurchaseOfferCodes/{id}/relationships/customCodes:
    parameters:
    - name: id
      in: path
      description: the id of the requested resource
      schema:
        type: string
      style: simple
      required: true
    get:
      tags:
      - InAppPurchaseOfferCodes
      operationId: inAppPurchaseOfferCodes_customCodes_getToManyRelationship
      parameters:
      - name: limit
        in: query
        description: maximum resources per page
        schema:
          type: integer
          maximum: 200
        style: form
      responses:
        '400':
          description: Parameter error(s)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized error(s)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '200':
          description: List of related linkages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InAppPurchaseOfferCodeCustomCodesLinkagesResponse'
        '429':
          description: Rate limit exceeded error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      summary: List Related in App Purchase Offer Codes / Custom Codes
  /v1/inAppPurchaseOfferCodes/{id}/customCodes:
    parameters:
    - name: id
      in: path
      description: the id of the requested resource
      schema:
        type: string
      style: simple
      required: true
    get:
      tags:
      - InAppPurchaseOfferCodes
      operationId: inAppPurchaseOfferCodes_customCodes_getToManyRelated
      parameters:
      - name: fields[inAppPurchaseOfferCodeCustomCodes]
        in: query
        description: the fields to include for returned resources of type inAppPurchaseOfferCodeCustomCodes
        schema:
          type: array
          items:
            type: string
            enum:
            - customCode
            - numberOfCodes
            - createdDate
            - expirationDate
            - active
            - createdByActor
            - deactivatedByActor
        style: form
        explode: false
      - name: fields[actors]
        in: query
        description: the fields to include for returned resources of type actors
        schema:
          type: array
          items:
            type: string
            enum:
            - actorType
            - userFirstName
            - userLastName
            - userEmail
            - apiKeyId
        style: form
        explode: false
      - name: limit
        in: query
        description: maximum resources per page
        schema:
          type: integer
          maximum: 200
        style: form
      - name: include
        in: query
        description: comma-separated list of relationships to include
        schema:
          type: array
          items:
            type: string
            enum:
            - createdByActor
            - deactivatedByActor
        style: form
        explode: false
      responses:
        '400':
          description: Parameter error(s)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized error(s)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '200':
          description: List of InAppPurchaseOfferCodeCustomCodes
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InAppPurchaseOfferCodeCustomCodesResponse'
        '429':
          description: Rate limit exceeded error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      summary: List Related in App Purchase Offer Codes / Custom Codes
  /v1/inAppPurchaseOfferCodes/{id}/relationships/oneTimeUseCodes:
    parameters:
    - name: id
      in: path
      description: the id of the requested resource
      schema:
        type: string
      style: simple
      required: true
    get:
      tags:
      - InAppPurchaseOfferCodes
      operationId: inAppPurchaseOfferCodes_oneTimeUseCodes_getToManyRelationship
      parameters:
      - name: limit
        in: query
        description: maximum resources per page
        schema:
          type: integer
          maximum: 200
        style: form
      responses:
        '400':
          description: Parameter error(s)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized error(s)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '200':
          description: List of related linkages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InAppPurchaseOfferCodeOneTimeUseCodesLinkagesResponse'
        '429':
          description: Rate limit exceeded error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      summary: List Related in App Purchase Offer Codes / One Time Use Codes
  /v1/inAppPurchaseOfferCodes/{id}/oneTimeUseCodes:
    parameters:
    - name: id
      in: path
      description: the id of the requested resource
      schema:
        type: string
      style: simple
      required: true
    get:
      tags:
      - InAppPurchaseOfferCodes
      operationId: inAppPurchaseOfferCodes_oneTimeUseCodes_getToManyRelated
      parameters:
      - name: fields[inAppPurchaseOfferCodeOneTimeUseCodes]
        in: query
        description: the fields to include for returned resources of type inAppPurchaseOfferCodeOneTimeUseCodes
        schema:
          type: array
          items:
            type: string
            enum:
            - numberOfCodes
            - createdDate
            - expirationDate
            - active
            - environment
            - values
            - createdByActor
            - deactivatedByActor
        style: form
        explode: false
      - name: fields[actors]
        in: query
        description: the fields to include for returned resources of type actors
        schema:
          type: array
          items:
            type: string
            enum:
            - actorType
            - userFirstName
            - userLastName
            - userEmail
            - apiKeyId
        style: form
        explode: false
      - name: limit
        in: query
        description: maximum resources per page
        schema:
          type: integer
          maximum: 200
        style: form
      - name: include
        in: query
        description: comma-separated list of relationships to include
        schema:
          type: array
          items:
            type: string
            enum:
            - createdByActor
            - deactivatedByActor
        style: form
        explode: false
      responses:
        '400':
          description: Parameter error(s)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized error(s)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '200':
          description: List of InAppPurchaseOfferCodeOneTimeUseCodes
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InAppPurchaseOfferCodeOneTimeUseCodesResponse'
        '429':
          description: Rate limit exceeded error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      summary: List Related in App Purchase Offer Codes / One Time Use Codes
  /v1/inAppPurchaseOfferCodes/{id}/relationships/prices:
    parameters:
    - name: id
      in: path
      description: the id of the requested resource
      schema:
        type: string
      style: simple
      required: true
    get:
      tags:
      - InAppPurchaseOfferCodes
      operationId: inAppPurchaseOfferCodes_prices_getToManyRelationship
      parameters:
      - name: limit
        in: query
        description: maximum resources per page
        schema:
          type: integer
          maximum: 200
        style: form
      responses:
        '400':
          description: Parameter error(s)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized error(s)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '200':
          description: List of related linkages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InAppPurchaseOfferCodePricesLinkagesResponse'
        '429':
          description: Rate limit exceeded error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      summary: List Related in App Purchase Offer Codes / Prices
  /v1/inAppPurchaseOfferCodes/{id}/prices:
    parameters:
    - name: id
      in: path
      description: the id of the requested resource
      schema:
        type: string
      style: simple
      required: true
    get:
      tags:
      - InAppPurchaseOfferCodes
      operationId: inAppPurchaseOfferCodes_prices_getToManyRelated
      parameters:
      - name: filter[territory]
        in: query
        description: filter by id(s) of related 'territory'
        schema:
          type: array
          items:
            type: string
        style: form
        explode: false
      - name: fields[inAppPurchaseOfferPrices]
        in: query
        description: the fields to include for returned resources of type inAppPurchaseOfferPrices
        schema:
          type: array
          items:
            type: string
            enum:
            - territory
            - pricePoint
        style: form
        explode: false
      - name: fields[territories]
        in: query
        description: the fields to include for returned resources of type territories
        schema:
          type: array
          items:
            type: string
            enum:
            - currency
        style: form
        explode: false
      - name: fields[inAppPurchasePricePoints]
        in: query
        description: the fields to include for returned resources of type inAppPurchasePricePoints
        schema:
          type: array
          items:
            type: string
            enum:
            - customerPrice
            - proceeds
            - territory
            - equalizations
        style: form
        explode: false
      - name: limit
        in: query
        description: maximum resources per page
        schema:
          type: integer
          maximum: 200
        style: form
      - name: include
        in: query
        description: comma-separated list of relationships to include
        schema:
          type: array
          items:
            type: string
            enum:
            - territory
            - pricePoint
        style: form
        explode: false
      responses:
        '400':
          description: Parameter error(s)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized error(s)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '200':
          description: List of InAppPurchaseOfferPrices
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InAppPurchaseOfferPricesResponse'
        '429':
          description: Rate limit exceeded error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      summary: List Related in App Purchase Offer Codes / Prices
components:
  schemas:
    InAppPurchaseOfferCodeCreateRequest:
      type: object
      title: InAppPurchaseOfferCodeCreateRequest
      properties:
        data:
          type: object
          properties:
            type:
              type: string
              enum:
              - inAppPurchaseOfferCodes
            attributes:
              type: object
              properties:
                name:
                  type: string
                customerEligibilities:
                  type: array
                  items:
                    type: string
                    enum:
                    - NON_SPENDER
                    - ACTIVE_SPENDER
                    - CHURNED_SPENDER
              required:
              - name
              - customerEligibilities
            relationships:
              type: object
              properties:
                inAppPurchase:
                  type: object
                  properties:
                    data:
                      type: object
                      properties:
                        type:
                          type: string
                          enum:
                          - inAppPurchases
                        id:
                          type: string
                      required:
                      - id
                      - type
                  required:
                  - data
                prices:
                  type: object
                  properties:
                    data:
                      type: array
                      items:
                        type: object
                        properties:
                          type:
                            type: string
                            enum:
                            - inAppPurchaseOfferPrices
                          id:
                            type: string
                        required:
                        - id
                        - type
                  required:
                  - data
              required:
              - inAppPurchase
              - prices
          required:
          - relationships
          - attributes
          - type
        included:
          type: array
          items:
            $ref: '#/components/schemas/InAppPurchaseOfferPriceInlineCreate'
      required:
      - data
    PagedDocumentLinks:
      type: object
      properties:
        self:
          type: string
          format: uri-reference
        first:
          type: string
          format: uri-reference
        next:
          type: string
          format: uri-reference
      required:
      - self
    ResourceLinks:
      type: object
      properties:
        self:
          type: string
          format: uri-reference
    ErrorSourceParameter:
      type: object
      title: Parameter
      properties:
        parameter:
          type: string
      required:
      - parameter
    ErrorLinks:
      type: object
      properties:
        about:
          type: string
          format: uri-reference
        associated:
          oneOf:
          - type: string
            format: uri-reference
          - type: object
            properties:
              href:
                type: string
                format: uri-reference
              meta:
                type: object
                properties:
                  source:
                    type: string
    InAppPurchaseOfferPricesResponse:
      type: object
      title: InAppPurchaseOfferPricesResponse
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/InAppPurchaseOfferPrice'
        included:
          type: array
          items:
            oneOf:
            - $ref: '#/components/schemas/InAppPurchasePricePoint'
            - $ref: '#/components/schemas/Territory'
            discriminator:
              propertyName: type
              mapping:
                territories: '#/components/schemas/Territory'
                inAppPurchasePricePoints: '#/components/schemas/InAppPurchasePricePoint'
        links:
          $ref: '#/components/schemas/PagedDocumentLinks'
        meta:
          $ref: '#/components/schemas/PagingInformation'
      required:
      - data
      - links
    InAppPurchaseOfferPrice:
      type: object
      title: InAppPurchaseOfferPrice
      properties:
        type:
          type: string
          enum:
          - inAppPurchaseOfferPrices
        id:
          type: string
        relationships:
          type: object
          properties:
            territory:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    type:
                      type: string
                      enum:
                      - territories
                    id:
                      type: string
                  required:
                  - id
                  - type
            pricePoint:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    type:
                      type: string
                      enum:
                      - inAppPurchasePricePoints
                    id:
                      type: string
                  required:
                  - id
                  - type
        links:
          $ref: '#/components/schemas/ResourceLinks'
      required:
      - id
      - type
    DocumentLinks:
      type: object
      properties:
        self:
          type: string
          format: uri-reference
      required:
      - self
    InAppPurchaseOfferPriceInlineCreate:
      type: object
      properties:
        type:
          type: string
          enum:
          - inAppPurchaseOfferPrices
        id:
          type: string
        relationships:
          type: object
          properties:
            territory:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    type:
                      type: string
                      enum:
                      - territories
                    id:
                      type: string
                  required:
                  - id
                  - type
            pricePoint:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    type:
                      type: string
                      enum:
                      - inAppPurchasePricePoints
                    id:
                      type: string
                  required:
                  - id
                  - type
      required:
      - type
    InAppPurchaseOfferCodeOneTimeUseCodesResponse:
      type: object
      title: InAppPurchaseOfferCodeOneTimeUseCodesResponse
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/InAppPurchaseOfferCodeOneTimeUseCode'
        included:
          type: array
          items:
            $ref: '#/components/schemas/Actor'
        links:
          $ref: '#/components/schemas/PagedDocumentLinks'
        meta:
          $ref: '#/components/schemas/PagingInformation'
      required:
      - data
      - links
    Actor:
      type: object
      title: Actor
      properties:
        type:
          type: string
          enum:
          - actors
        id:
          type: string
        attributes:
          type: object
          properties:
            actorType:
              type: string
              enum:
              - USER
              - API_KEY
              - XCODE_CLOUD
              - APPLE
            userFirstName:
              type: string
            userLastName:
              type: string
            userEmail:
              type: string
            apiKeyId:
              type: string
        links:
          $ref: '#/components/schemas/ResourceLinks'
      required:
      - id
      - type
    ErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              status:
                type: string
              code:
                type: string
              title:
      

# --- truncated at 32 KB (45 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/ios/refs/heads/main/openapi/ios-inapppurchaseoffercodes-api-openapi.yml