> ## Documentation Index
> Fetch the complete documentation index at: https://docs.loopreturns.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Blocklist Item

> Create a blocklist entry.

### Required API key scope
- Orders




## OpenAPI

````yaml post /blocklists
openapi: 3.1.0
info:
  title: Listings API
  description: >-
    Loop Listings can be utilized to allow exceptions and prevent returns in
    specific situations. This API can be used to manage your shop's listings.
  version: v1
servers:
  - url: https://api.loopreturns.com/api/v1
security: []
tags:
  - name: Blocklist
  - name: Allowlist
paths:
  /blocklists:
    post:
      tags:
        - Blocklist
      summary: Create Blocklist Item
      description: |
        Create a blocklist entry.

        ### Required API key scope
        - Orders
      operationId: createBlocklistItem
      requestBody:
        $ref: '#/components/requestBodies/CreateBlocklistRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlocklistEntryWithCreatedAtResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
        '422':
          description: Unprocessable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableResponse'
      security:
        - api_key: []
components:
  requestBodies:
    CreateBlocklistRequest:
      content:
        application/json:
          schema:
            type: object
            required:
              - value
              - type
            properties:
              value:
                type: string
                examples:
                  - example@example.com
                description: >-
                  The blocked value. Items purchased using this value will be
                  ineligible for return.
              type:
                $ref: '#/components/schemas/BlocklistValueType'
              secondary_value:
                type: string
                examples:
                  - example.2@example.com
                description: >-
                  An additional blocked value associated with this entry. Items
                  purchased using this value will also be ineligible for return.
  schemas:
    BlocklistEntryWithCreatedAtResponse:
      type: object
      properties:
        id:
          type: integer
          examples:
            - 1
          description: The unique identifier associated with the blocklist entry.
        type:
          $ref: '#/components/schemas/BlocklistValueType'
        value:
          type: string
          examples:
            - example@example.com
          description: >-
            The blocked value. Items purchased using this value will be
            ineligible for return.
        secondary_value:
          type:
            - string
            - 'null'
          examples:
            - example.2@example.com
          description: >-
            An additional blocked value associated with this entry. Items
            purchased using this value will also be ineligible for return.
        created_at:
          type:
            - string
            - 'null'
          format: date-time
          examples:
            - '2023-06-09 00:00:00'
          description: The date and time at which the entry was created.
    UnauthorizedResponse:
      type: object
      required:
        - errors
      properties:
        errors:
          type: string
          examples:
            - Unauthorized.
    UnprocessableResponse:
      type: object
      properties:
        message:
          description: >-
            The error message returned when an unsupported value is submitted in
            the `type` field.
          type: string
          examples:
            - >-
              Must be one of the following values: order, product, email,
              product_tag
        errors:
          type: object
    BlocklistValueType:
      type: string
      description: >-
        The type of value blocked by this blocklist entry. `order` is the order
        number of the blocked order, `email` is the blocked customer's email
        address, `product` is the variant ID of the blocked product, and
        `product_tag` disables returns for all products with that tag.
      enum:
        - order
        - email
        - product
        - product_tag
  securitySchemes:
    api_key:
      type: apiKey
      name: X-Authorization
      in: header

````