---
openapi: 3.0.1
info:
  title: Reloadify API
  version: v1
  contact:
    name: Support
    url: https://www.reloadify.com/contact/
    email: support@reloadify.com
paths:
  "/api/v1/languages/{language_id}/brands":
    post:
      summary: Creates or updates a brand
      parameters:
      - name: language_id
        in: path
        required: true
        schema:
          type: string
      tags:
      - Brands
      operationId: createBrand
      description: Creates a new brand or updates an existing brand based on the brand's
        `id`. When `product_ids` is set, each product in `product_ids` is linked to
        this brand. When a product in `product_ids` does not exist, a stub product
        is created.
      responses:
        '400':
          description: Missing required parameters or unknown parameters
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_400"
        '401':
          description: Not authorized
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_401"
        '404':
          description: Language not found
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/language_error_404"
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_500"
        '200':
          description: Brand successfully saved
          content:
            application/json:
              schema:
                type: object
                properties:
                  brand:
                    "$ref": "#/components/schemas/brand"
                  message:
                    type: string
                    example: Brand successfully saved
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                brand:
                  "$ref": "#/components/schemas/brand"
        required: true
  "/api/v1/languages/{language_id}/brands/{brand_id}":
    delete:
      summary: Deletes a brand
      parameters:
      - name: language_id
        in: path
        required: true
        schema:
          type: string
      - name: brand_id
        in: path
        required: true
        schema:
          type: string
      tags:
      - Brands
      operationId: deleteBrand
      description: Deletes an existing brand. All associated products will still exist
        after this operation.
      responses:
        '401':
          description: Not authorized
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_401"
        '404':
          description: Language not found or brand not found
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/language_or_resource_error_404"
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_500"
        '200':
          description: Brand successfully deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  brand:
                    "$ref": "#/components/schemas/brand"
                  message:
                    type: string
                    example: Brand successfully deleted
  "/api/v1/languages/{language_id}/categories":
    post:
      summary: Creates or updates a category
      parameters:
      - name: language_id
        in: path
        required: true
        schema:
          type: string
      tags:
      - Categories
      operationId: createCategory
      description: Creates a new category or updates an existing category based on
        the category's `id`. When `parent_category_id` is set, this category is linked
        to the specified parent category. When the parent category does not exist,
        a stub parent category is created. When `product_ids` is set, each product
        in `product_ids` is linked to this product. When a product in `product_ids`
        does not exist, a stub product is created.
      responses:
        '400':
          description: Missing required parameters or unknown parameters
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_400"
        '401':
          description: Not authorized
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_401"
        '404':
          description: Language not found
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/language_error_404"
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_500"
        '200':
          description: Category successfully saved
          content:
            application/json:
              schema:
                type: object
                properties:
                  category:
                    "$ref": "#/components/schemas/category"
                  message:
                    type: string
                    example: Category successfully saved
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                category:
                  "$ref": "#/components/schemas/category"
        required: true
  "/api/v1/languages/{language_id}/categories/{category_id}":
    delete:
      summary: Deletes a category
      parameters:
      - name: language_id
        in: path
        required: true
        schema:
          type: string
      - name: category_id
        in: path
        required: true
        schema:
          type: string
      tags:
      - Categories
      operationId: deleteCategory
      description: Deletes an existing category. The associated parent category will
        still exist after this operation. Each associated product will still exist
        after this operation.
      responses:
        '401':
          description: Not authorized
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_401"
        '404':
          description: Language not found or category not found
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/language_or_resource_error_404"
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_500"
        '200':
          description: Category successfully deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  category:
                    "$ref": "#/components/schemas/category"
                  message:
                    type: string
                    example: Category successfully deleted
  "/api/v1/languages/":
    post:
      summary: Creates or updates a language
      parameters:
      - name: language_id
        in: path
        required: true
        schema:
          type: string
      tags:
      - Languages
      operationId: createLanguage
      description: Creates a new language or updates an existing language based on
        the language's `id`.
      responses:
        '400':
          description: Missing required parameters or unknown parameters
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_400"
        '401':
          description: Not authorized
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_401"
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_500"
        '200':
          description: Language successfully saved
          content:
            application/json:
              schema:
                type: object
                properties:
                  language:
                    "$ref": "#/components/schemas/language"
                  message:
                    type: string
                    example: Language successfully saved
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                language:
                  "$ref": "#/components/schemas/language"
        required: true
  "/api/v1/languages/{language_id}":
    delete:
      summary: Deletes a language
      parameters:
      - name: language_id
        in: path
        required: true
        schema:
          type: string
      tags:
      - Languages
      operationId: deleteLanguage
      description: Deletes an existing language.
      responses:
        '401':
          description: Not authorized
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_401"
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_500"
        '200':
          description: Language successfully deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  language:
                    "$ref": "#/components/schemas/language"
                  message:
                    type: string
                    example: Language successfully deleted
  "/oauth/token":
    post:
      summary: Request an access token
      tags:
      - OAuth
      operationId: requestToken
      description: Requests an OAuth access token which is required for executing
        API requests. The token is valid for a maximum of 2 hours, after which a new
        token must be requested. A `client_id` and `client_secret` pair can be generated
        in the Reload Mailing app under `settings -> Reloadify API`.
      security: []
      parameters: []
      responses:
        '200':
          description: Access token issued
          content:
            application/json:
              schema:
                type: object
                properties:
                  access_token:
                    type: string
                    example: 0ZcnX9K9xJgCH5Ak_49-aoN_gB4z7qejVpsVazDSrM4
                  token_type:
                    type: string
                    example: Bearer
                  expires_in:
                    type: integer
                    example: 7200
                    description: The duration in number of seconds
                  created_at:
                    type: integer
                    example: 1593683278
                    description: The number of seconds since the Epoch (January 1,
                      1970 00:00 UTC) when the token was issued
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: unsupported_grant_type
                  error_description:
                    type: string
                    example: The authorization grant type is not supported by the
                      authorization server.
        '401':
          description: Not authorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: invalid_client
                  error_description:
                    type: string
                    example: Client authentication failed due to unknown client, no
                      client authentication included, or unsupported authentication
                      method.
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_500"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                grant_type:
                  type: string
                  example: client_credentials
                  values: client_credentials
                client_id:
                  type: string
                  example: LsU5YC9-FuE2fKImvyeeYQ0oJuog_pbu8Bq2djAck3A
                client_secret:
                  type: string
                  example: DdvQosnHDSXvkAHvXBt_pkv_12EicjlvTXdi8lenWXU
              required:
              - grant_type
              - client_id
              - client_secret
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                grant_type:
                  type: string
                  example: client_credentials
                  values: client_credentials
                client_id:
                  type: string
                  example: LsU5YC9-FuE2fKImvyeeYQ0oJuog_pbu8Bq2djAck3A
                client_secret:
                  type: string
                  example: DdvQosnHDSXvkAHvXBt_pkv_12EicjlvTXdi8lenWXU
              required:
              - grant_type
              - client_id
              - client_secret
        required: true
  "/api/v1/languages/{language_id}/orders":
    post:
      summary: Creates or updates an order
      parameters:
      - name: language_id
        in: path
        required: true
        schema:
          type: string
      tags:
      - Orders
      operationId: createOrder
      description: Creates a new order or updates an existing order based on the order's
        `id`. The profile with id `profile_id` is linked to this order. When the profile
        does not exist, a stub profile is created. Each product in products is linked
        to this order based on its `id`. When a product in products does not exist,
        a stub product is created.
      responses:
        '400':
          description: Missing required parameters or unknown parameters
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_400"
        '401':
          description: Not authorized
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_401"
        '404':
          description: Language not found
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/language_error_404"
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_500"
        '200':
          description: Order successfully saved
          content:
            application/json:
              schema:
                type: object
                properties:
                  order:
                    "$ref": "#/components/schemas/order"
                  message:
                    type: string
                    example: Order successfully saved
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                order:
                  allOf:
                  - "$ref": "#/components/schemas/order"
                  - type: object
                    properties:
                      shopping_cart_id:
                        oneOf:
                        - type: string
                        - type: integer
                        example: 1
        required: true
  "/api/v1/languages/{language_id}/orders/{order_id}":
    delete:
      summary: Deletes an order
      parameters:
      - name: language_id
        in: path
        required: true
        schema:
          type: string
      - name: order_id
        in: path
        required: true
        schema:
          type: string
      tags:
      - Orders
      operationId: deleteOrder
      description: Deletes an existing order. Each associated profile and product
        will still exist after this operation.
      responses:
        '401':
          description: Not authorized
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_401"
        '404':
          description: Language not found or order not found
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/language_or_resource_error_404"
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_500"
        '200':
          description: Order successfully deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  order:
                    "$ref": "#/components/schemas/order"
                  message:
                    type: string
                    example: Order successfully deleted
  "/api/v1/languages/{language_id}/products":
    post:
      summary: Creates or updates a product
      parameters:
      - name: language_id
        in: path
        required: true
        schema:
          type: string
      tags:
      - Products
      operationId: createProduct
      description: Creates a new product or updates an existing product based on the
        product's `id`. When `variant_ids` is set, each variant in `variant_ids` is
        linked to this product. When a variant in `variant_ids` does not exist, a
        stub variant is created. When `relevant_product_ids` is set, each product
        in `relevant_product_ids` is linked to this product. When a product in `relevant_product_ids`
        does not exist, a stub product is created. When `review_ids` is set, each
        review in `review_ids` is linked to this product. When a review in `review_ids`
        does not exist, a stub review is created. When `category_ids` is set, each
        category in `category_ids` is linked to this product. When a category in `category_ids`
        does not exist, a stub category is created.
      responses:
        '400':
          description: Missing required parameters or unknown parameters
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_400"
        '401':
          description: Not authorized
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_401"
        '404':
          description: Language not found
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/language_error_404"
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_500"
        '200':
          description: Product successfully saved
          content:
            application/json:
              schema:
                type: object
                properties:
                  product:
                    "$ref": "#/components/schemas/product"
                  message:
                    type: string
                    example: Product successfully saved
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                product:
                  "$ref": "#/components/schemas/product"
        required: true
  "/api/v1/languages/{language_id}/products/{product_id}":
    delete:
      summary: Deletes a product
      parameters:
      - name: language_id
        in: path
        required: true
        schema:
          type: string
      - name: product_id
        in: path
        required: true
        schema:
          type: string
      tags:
      - Products
      operationId: deleteProduct
      description: Deletes an existing product. Each associated product and review
        will still exist after this operation. All variants are deleted along with
        the product. Each associated category will still exist after this operation.
      responses:
        '401':
          description: Not authorized
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_401"
        '404':
          description: Language not found or product not found
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/language_or_resource_error_404"
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_500"
        '200':
          description: Product successfully deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  product:
                    "$ref": "#/components/schemas/product"
                  message:
                    type: string
                    example: Product successfully deleted
  "/api/v1/languages/{language_id}/profiles":
    get:
      summary: Finds an existing profile
      parameters:
      - name: language_id
        in: path
        required: true
        schema:
          type: string
      - name: email
        in: query
        required: false
        schema:
          type: string
      - name: id
        in: query
        required: false
        schema:
          type: string
      tags:
      - Profiles
      operationId: getProfile
      description: Finds an existing profile by the profiles `id` or `email`.
      responses:
        '400':
          description: Missing required parameters or unknown parameters
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_400"
        '401':
          description: Not authorized
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_401"
        '404':
          description: Language not found
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/language_error_404"
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_500"
        '200':
          description: Profile successfully found
          content:
            application/json:
              schema:
                type: object
                properties:
                  profile:
                    "$ref": "#/components/schemas/profile"
    post:
      summary: Creates or updates a profile
      parameters:
      - name: language_id
        in: path
        required: true
        schema:
          type: string
      tags:
      - Profiles
      operationId: createProfile
      description: Creates a new profile or updates an existing profile based on the
        profile's `id` or `email`. For new profiles, the email address is required.
        For existing profiles supplying either an email address or an id is sufficient.
      responses:
        '400':
          description: Missing required parameters or unknown parameters
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_400"
        '401':
          description: Not authorized
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_401"
        '404':
          description: Language not found
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/language_error_404"
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_500"
        '200':
          description: Profile successfully saved
          content:
            application/json:
              schema:
                type: object
                properties:
                  profile:
                    "$ref": "#/components/schemas/profile"
                  message:
                    type: string
                    example: Profile successfully saved
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                profile:
                  "$ref": "#/components/schemas/profile"
        required: true
  "/api/v1/languages/{language_id}/profiles/{profile_id}":
    delete:
      summary: Deletes a profile
      parameters:
      - name: language_id
        in: path
        required: true
        schema:
          type: string
      - name: profile_id
        in: path
        required: true
        schema:
          type: string
      tags:
      - Profiles
      operationId: deleteProfile
      description: Deletes an existing profile.
      responses:
        '401':
          description: Not authorized
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_401"
        '404':
          description: Language not found or profile not found
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/language_or_resource_error_404"
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_500"
        '200':
          description: Profile successfully deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  profile:
                    "$ref": "#/components/schemas/profile"
                  message:
                    type: string
                    example: Profile successfully deleted
  "/api/v1/languages/{language_id}/reviews":
    post:
      summary: Creates or updates a review
      parameters:
      - name: language_id
        in: path
        required: true
        schema:
          type: string
      tags:
      - Reviews
      operationId: createReview
      description: Creates a new review or updates an existing review based on the
        reviews' `id`. The profile with id `profile_id` is linked to this order. When
        the profile does not exist, a stub profile is created. The product with id
        `product_id` is linked to this order. When the product does not exist, a stub
        product is created.
      responses:
        '400':
          description: Missing required parameters or unknown parameters
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_400"
        '401':
          description: Not authorized
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_401"
        '404':
          description: Language not found
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/language_error_404"
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_500"
        '200':
          description: Review successfully saved
          content:
            application/json:
              schema:
                type: object
                properties:
                  review:
                    "$ref": "#/components/schemas/review"
                  message:
                    type: string
                    example: Review successfully saved
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                review:
                  "$ref": "#/components/schemas/review"
        required: true
  "/api/v1/languages/{language_id}/reviews/{review_id}":
    delete:
      summary: Deletes a review
      parameters:
      - name: language_id
        in: path
        required: true
        schema:
          type: string
      - name: review_id
        in: path
        required: true
        schema:
          type: string
      tags:
      - Reviews
      operationId: deleteReview
      description: Deletes an existing review. The associated profile and product
        will still exist after this operation.
      responses:
        '401':
          description: Not authorized
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_401"
        '404':
          description: Language not found or review not found
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/language_or_resource_error_404"
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_500"
        '200':
          description: Review successfully deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  review:
                    "$ref": "#/components/schemas/review"
                  message:
                    type: string
                    example: Review successfully deleted
  "/api/v1/languages/{language_id}/shopping_carts":
    post:
      summary: Creates or updates a shopping cart
      parameters:
      - name: language_id
        in: path
        required: true
        schema:
          type: string
      tags:
      - ShoppingCarts
      operationId: createShoppingCart
      description: Creates a new shopping cart or updates an existing shopping cart
        based on the shopping cart's `id`. The profile with id `profile_id` is linked
        to this shopping cart. When the profile does not exist, a stub profile is
        created. Each product in `product_ids` is linked to this shopping cart based
        on its `id`. When a product in `product_ids` does not exist, a stub product
        is created.
      responses:
        '400':
          description: Missing required parameters or unknown parameters
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_400"
        '401':
          description: Not authorized
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_401"
        '404':
          description: Language not found
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/language_error_404"
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_500"
        '200':
          description: ShoppingCart successfully saved
          content:
            application/json:
              schema:
                type: object
                properties:
                  shopping_cart:
                    "$ref": "#/components/schemas/shopping_cart"
                  message:
                    type: string
                    example: Shopping cart successfully saved
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                shopping_cart:
                  "$ref": "#/components/schemas/shopping_cart"
        required: true
  "/api/v1/languages/{language_id}/shopping_carts/{shopping_cart_id}":
    delete:
      summary: Deletes a shopping cart
      parameters:
      - name: language_id
        in: path
        required: true
        schema:
          type: string
      - name: shopping_cart_id
        in: path
        required: true
        schema:
          type: string
      tags:
      - ShoppingCarts
      operationId: deleteShoppingCart
      description: Deletes an existing shopping cart. Each associated profile and
        product will still exist after this operation.
      responses:
        '401':
          description: Not authorized
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_401"
        '404':
          description: Language not found or shopping_cart not found
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/language_or_resource_error_404"
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_500"
        '200':
          description: ShoppingCart successfully deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  shopping_cart:
                    "$ref": "#/components/schemas/shopping_cart"
                  message:
                    type: string
                    example: Shopping cart successfully deleted
  "/api/v1/languages/{language_id}/variants":
    post:
      summary: Creates or updates a variant
      parameters:
      - name: language_id
        in: path
        required: true
        schema:
          type: string
      tags:
      - Variants
      operationId: createVariant
      description: Creates a new variant or updates an existing variant based on the
        variant's `id`. The product with id `product_id` is linked to this variant.
        When the product does not exist, a stub product is created.
      responses:
        '400':
          description: Missing required parameters or unknown parameters
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_400"
        '401':
          description: Not authorized
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_401"
        '404':
          description: Language not found
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/language_error_404"
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_500"
        '200':
          description: Variant successfully saved
          content:
            application/json:
              schema:
                type: object
                properties:
                  variant:
                    "$ref": "#/components/schemas/variant"
                  message:
                    type: string
                    example: Variant successfully saved
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                variant:
                  "$ref": "#/components/schemas/variant"
        required: true
  "/api/v1/languages/{language_id}/variants/{variant_id}":
    delete:
      summary: Deletes a variant
      parameters:
      - name: language_id
        in: path
        required: true
        schema:
          type: string
      - name: variant_id
        in: path
        required: true
        schema:
          type: string
      tags:
      - Variants
      operationId: deletVariant
      description: Deletes an existing variant. The associated product will still
        exist after this operation.
      responses:
        '401':
          description: Not authorized
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_401"
        '404':
          description: Language not found or variant not found
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/language_or_resource_error_404"
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                "$ref": "#/components/responses/error_500"
        '200':
          description: Variant successfully deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  variant:
                    "$ref": "#/components/schemas/variant"
                  message:
                    type: string
                    example: Variant successfully deleted
servers:
- url: https://api.reloadify.com
components:
  securitySchemes:
    OAuth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://api.reloadify.com/oauth/token
          scopes: {}
  schemas:
    brand:
      type: object
      properties:
        id:
          oneOf:
          - type: string
          - type: integer
          example: 42
        name:
          type: string
          example: My Brand
        url:
          type: string
          format: url
          example: www.example.com
        content:
          type: string
          example: lorem ipsum
        product_ids:
          type: array
          items:
            anyOf:
            - type: string
            - type: integer
          example:
          - 1
          - 2
          - 3
          description: A list of product identifiers which belong to this brand.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
      - id
      - name
    category:
      type: object
      properties:
        id:
          oneOf:
          - type: string
          - type: integer
          example: 42
        name:
          type: string
          example: My Category
        url:
          type: string
          format: url
          example: www.example.com
        visible:
          type: boolean
          example: true
        parent_category_id:
          oneOf:
          - type: string
          - type: integer
          example: 1
        product_ids:
          type: array
          items:
            anyOf:
            - type: string
            - type: integer
          example:
          - 1
          - 2
          - 3
          description: A list of product identifiers for this category.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
      - id
      - name
    language:
      type: object
      properties:
        id:
          oneOf:
          - type: string
          - type: integer
          example: 42
        active:
          type: boolean
          example: true
        code:
          type: string
          example: EN
        name:
          type: string
          example: English
        url:
          type: string
          format: url
          example: www.example.com
      required:
      - id
      - name
      - code
    order:
      type: object
      properties:
        id:
          oneOf:
          - type: string
          - type: integer
          example: 42
        currency:
          type: string
          example: Euro
        number:
          type: string
          example: ORD01234
        price:
          type: number
          format: double
          example: 10.52
        paid:
          type: boolean
          example: true
        status:
          type: string
          enum:
          - processing
          - shipped
          - completed
          - cancelled
          example: processing
        profile_id:
          oneOf:
          - type: string
          - type: integer
          example: 1
        products:
          type: array
          items:
            type: object
            properties:
              id:
                oneOf:
                - type: string
                - type: integer
                required: true
              quantity:
                type: integer
          example:
          - id: 1
            quantity: 3
          - id: 2
            quantity: 1
          - id: 3
            quantity: 2
        deliver_date:
          type: string
          format: date-time
        ordered_at:
          type: string
          format: date-time
        created_at:
          type: string
          format: date-time
      required:
      - id
      - profile_id
      - products
    product:
      type: object
      properties:
        id:
          oneOf:
          - type: string
          - type: integer
          example: 42
        name:
          type: string
          example: My Product
        short_description:
          type: string
          example: lorem ipsum
        price:
          type: number
          format: double
          example: 10.52
        url:
          type: string
          format: url
          example: www.example.com
        main_image:
          type: string
          format: url
          example: www.example.com/my_product_image.bmp
        visible:
          type: boolean
          example: true
        variant_ids:
          type: array
          items:
            anyOf:
            - type: string
            - type: integer
          example:
          - 1
          - 2
          - 3
          description: A list of variant identifiers for this product.
        relevant_product_ids:
          type: array
          items:
            anyOf:
            - type: string
            - type: integer
          example:
          - 1
          - 2
          - 3
          description: A list of relevant products to this product.
        review_ids:
          type: array
          items:
            anyOf:
            - type: string
            - type: integer
          example:
          - 1
          - 2
          - 3
          description: A list of reviews for this product.
        category_ids:
          type: array
          items:
            anyOf:
            - type: string
            - type: integer
          example:
          - 1
          - 2
          - 3
          description: A list of categories for this product.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
      - id
      - name
    profile:
      type: object
      properties:
        id:
          oneOf:
          - type: string
          - type: integer
          example: 42
        birthdate:
          type: string
          format: date-time
        city:
          type: string
          example: Groningen
        province:
          type: string
          example: Groningen
        street:
          type: string
          example: Westerhaven
        housenumber:
          type: string
          example: 4a
        zipcode:
          type: string
          example: 9718AV
        country_code:
          type: string
          example: NL
        email:
          type: string
          format: email
          example: john_doe@example.com
        first_name:
          type: string
          example: John
        middle_name:
          type: string
          example: Doe
        last_name:
          type: string
          example: Junior
        gender:
          type: string
          enum:
          - unidentified
          - male
          - female
          example: undefined
        active:
          type: boolean
          example: true
        subscribed_to_newsletter:
          type: boolean
          example: true
        subscribed_to_newsletter_at:
          type: string
          format: date-time
        tags:
          type: array
          items:
            type: string
          example:
          - test
          - test_profile
          - fake
          description: A list of tags for to this profile.
        telephone:
          type: string
          example: '0501234567'
      required:
      - id
      - email
    review:
      type: object
      properties:
        id:
          oneOf:
          - type: string
          - type: integer
          example: 42
        name:
          type: string
          example: My Review
        score:
          type: integer
          example: 9
        visible:
          type: boolean
          example: true
        product_id:
          oneOf:
          - type: string
          - type: integer
          example: 1
        profile_id:
          oneOf:
          - type: string
          - type: integer
          example: 2
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
      - id
      - product_id
      - profile_id
    variant:
      type: object
      properties:
        id:
          oneOf:
          - type: string
          - type: integer
          example: 42
        title:
          type: string
          example: My Variant
        article_code:
          type: string
          example: V1234
        default:
          type: boolean
          example: true
        ean:
          type: string
          example: '4012345012345'
        main_image:
          type: string
          format: url
          example: www.example.com/my_variant_image.bmp
        price_cost:
          type: number
          format: double
          example: 10.52
        price_excl:
          type: number
          format: double
          example: 9.95
        price_incl:
          type: number
          format: double
          example: 10.52
        unit_price:
          type: number
          format: double
          example: 10.52
        unit_unit:
          type: string
          example: kilo
        sku:
          type: string
          example: ABC-DE-FGH-IJ
        stock_level:
          type: integer
          example: 12
        product_id:
          oneOf:
          - type: string
          - type: integer
          example: 1
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
      - id
      - product_id
    shopping_cart:
      type: object
      properties:
        id:
          oneOf:
          - type: string
          - type: integer
          example: 42
        currency:
          type: string
          example: Euro
        price:
          type: number
          format: double
          example: 10.52
        recovery_url:
          type: string
          format: url
          example: www.example.com/my_shopping_cart
        profile_id:
          oneOf:
          - type: string
          - type: integer
          example: 1
        product_ids:
          type: array
          items:
            anyOf:
            - type: string
            - type: integer
          example:
          - 1
          - 2
          - 3
          description: A list of product identifiers for this shopping cart.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
      - id
      - profile_id
      - product_ids
  responses:
    error_400:
      oneOf:
      - type: object
        properties:
          error:
            type: object
            properties:
              message:
                type: string
              missing_parameters:
                type: array
                items:
                  type: string
      - type: object
        properties:
          error:
            type: object
            properties:
              message:
                type: string
              unknown_parameters:
                type: array
                items:
                  type: string
      example:
        message: Missing required parameters
        missing_parameters:
        - id
    error_401:
      type: object
      properties:
        error:
          type: string
      example:
        error: Not authorized. Please request for an access token by sending a POST
          request with your client id and secret to '/oauth/token'.
    error_404:
      type: object
      properties:
        error:
          type: string
      example:
        error: "{Resource} not found"
    language_error_404:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
      example:
        error:
          message: Unknown language '{language_id}'
    language_or_resource_error_404:
      oneOf:
      - "$ref": "#/components/responses/language_error_404"
      - "$ref": "#/components/responses/error_404"
      example:
        error: "{Resource} not found"
    error_500:
      type: object
      properties:
        error:
          type: string
      example:
        error: Unable to process the request at this moment
security:
- OAuth2:
  - oAuthNoScopes: []
