> ## Documentation Index
> Fetch the complete documentation index at: https://developer.sandbox.co.in/llms.txt
> Use this file to discover all available pages before exploring further.

# GSTR-1 B2B

> Get all B2B invoices for a return period for authenticated taxpayer

#### Response schema

For successful responses, these resources describe the GSTN payload at `data.data`.

<Card title="View JSON schema" icon="code" href="https://raw.githubusercontent.com/in-co-sandbox/in-co-sandbox-docs/refs/heads/main/data/gst/schema/request/taxpayer/gstr-1/documents/b2b.json" arrow="true" horizontal />

<Card title="View Excel field reference" icon="file-spreadsheet" href="https://raw.githubusercontent.com/in-co-sandbox/in-co-sandbox-docs/refs/heads/main/data/gst/schema/workbook/taxpayer/gstr-1/documents/b2b-v4.1.xlsx" arrow="true" horizontal />


## OpenAPI

````yaml api-reference/gst/compliance/openapi.json GET /gst/compliance/tax-payer/gstrs/gstr-1/b2b/{year}/{month}
openapi: 3.0.1
info:
  title: compliance
  description: >-
    **GST Compliance API** enables businesses to automate compliance
    requirements like [Taxpayer
    verification](https://developer.sandbox.co.in/reference/search-gstin-api),
    [GSTR
    Filing](https://developer.sandbox.co.in/reference/gst-taxpayer-authentication),
    [Generating
    E-Invoices](https://developer.sandbox.co.in/reference/e-invoice-authentication-api),
    and [E-Way
    Bills](https://developer.sandbox.co.in/reference/e-way-bill-authentication-api).We
    provide these APIs from GSTN-authorised GST Suvidha Providers, handling the
    encryption-decryption and signing so you don't have to handle the
    complexities.
  version: 1.0.0
servers:
  - url: https://api.sandbox.co.in
  - url: https://test-api.sandbox.co.in
security: []
tags:
  - name: Public
  - name: Taxpayer
  - name: Taxpayer Auth
  - name: Returns
  - name: GSTR-1 Documents
  - name: File GSTR-1
  - name: GSTR-2A Documents
  - name: GSTR-2B Document
  - name: File GSTR-3B
  - name: GSTR-4
  - name: File GSTR-9
  - name: Invoice Management System
  - name: GSTR-1A Documents
  - name: File GSTR-1A
  - name: Ledgers
  - name: e-Invoice
  - name: Sales e-Invoices for return period
  - name: Purchase e-Invoices for return period
  - name: Front Office Notices
  - name: Front Office
  - name: AATO
  - name: e-Invoice1
  - name: Authentication
  - name: e-Invoice12
  - name: E-Way Bill
  - name: E-Way Bill1
  - name: Authentication1
  - name: Consignor
  - name: Consolidated E-Way Bill
  - name: Multi-Vehicle Movement
  - name: Consignee
  - name: Transporter
  - name: Consolidated E-Way Bill1
  - name: Multi-vehicle Movement
  - name: Common
paths:
  /gst/compliance/tax-payer/gstrs/gstr-1/b2b/{year}/{month}:
    get:
      tags:
        - Taxpayer
        - Returns
        - GSTR-1 Documents
      summary: GSTR-1 B2B
      description: "Get all B2B invoices for a return period for authenticated taxpayer\r\n\r\n"
      operationId: getGstr1B2b
      parameters:
        - name: year
          in: path
          description: ''
          required: true
          example: '{{year}}'
          schema:
            type: string
        - name: month
          in: path
          description: ''
          required: true
          example: '{{month}}'
          schema:
            type: string
        - name: action_required
          in: query
          description: >-
            `optional` Status filter for filtering the invoices. Possible
            values: `Y` or `N`. Status filter for filtering the invoices. Use
            filter value Y to fetches the invoices where tax payer need to take
            action. Already accepted or uploaded invoices can be fetched by
            using filter value N.
          required: false
          example: '{{action_required}}'
          schema:
            type: string
            example: '{{action_required}}'
        - name: from
          in: query
          description: From Date (DD/MM/YYYY)
          required: false
          example: '{{from}}'
          schema:
            type: string
            example: '{{from}}'
        - name: counterparty_gstin
          in: query
          description: '`optional` Counter party GSTIN'
          required: false
          schema:
            type: string
            example: '{{gstin}}'
        - name: authorization
          in: header
          description: >-
            GST taxpayer access token. For token-generation steps, refer to the
            [Generate Taxpayer
            Session](/recipes/gst/authentication/generate_tax_payer_session)
            recipe, then pass the token in the authorization header.
          required: true
          example: '{{gsp_access_token}}'
          schema:
            type: string
        - name: x-api-key
          in: header
          description: API key for identification
          required: true
          example: '{{api_key}}'
          schema:
            type: string
        - name: x-api-version
          in: header
          description: API version
          required: false
          example: ''
          schema:
            type: string
            default: 1.0.0
      responses:
        '200':
          description: >-
            200 Success / 200 Filtered by counterparty GSTIN / RET11416 No data
            found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetGstr1B2bResponse'
              examples:
                200 Filtered by counterparty GSTIN:
                  summary: 200 Filtered by counterparty GSTIN
                  value:
                    code: 200
                    data:
                      status_cd: '1'
                      data:
                        b2b:
                          - cfs: 'N'
                            ctin: 07ABCCD6123D1YZ
                            inv:
                              - cflag: 'N'
                                chksum: >-
                                  4b571a762c1c17818ff448fef1d690c95931868b72299f0671936720ba427fcd
                                flag: U
                                idt: 29-12-2023
                                inum: '78618'
                                inv_typ: R
                                irn: >-
                                  qoycq59t30429eb5dfa38d3b6efa65346dcff127abf439c76e3afd8fo3vtf9rn
                                irngendate: 03-01-2024
                                itms:
                                  - itm_det:
                                      camt: 0
                                      csamt: 0
                                      iamt: 719.82
                                      rt: 18
                                      samt: 0
                                      txval: 3999
                                    num: 1
                                pos: '07'
                                rchrg: 'N'
                                srctyp: e-Invoice
                                updby: S
                                val: 4718.82
                    timestamp: 1763446641000
                    transaction_id: 25411a6e-3fa0-4e49-b5d6-d27efc595237
                200 Success:
                  summary: 200 Success
                  value:
                    code: 200
                    data:
                      status_cd: '1'
                      data:
                        b2b:
                          - cfs: 'N'
                            ctin: 07ABCCD6123D1YZ
                            inv:
                              - cflag: 'N'
                                chksum: >-
                                  4b571a762c1c17818ff448fef1d690c95931868b72299f0671936720ba427fcd
                                flag: U
                                idt: 29-12-2023
                                inum: '78618'
                                inv_typ: R
                                irn: >-
                                  qoycq59t30429eb5dfa38d3b6efa65346dcff127abf439c76e3afd8fo3vtf9rn
                                irngendate: 03-01-2024
                                itms:
                                  - itm_det:
                                      camt: 0
                                      csamt: 0
                                      iamt: 719.82
                                      rt: 18
                                      samt: 0
                                      txval: 3999
                                    num: 1
                                pos: '07'
                                rchrg: 'N'
                                srctyp: e-Invoice
                                updby: S
                                val: 4718.82
                          - cfs: 'N'
                            ctin: 07ABCPA2123G1YZ
                            inv:
                              - cflag: 'N'
                                chksum: >-
                                  d2cd7bfe59317de95d0877e4277c40f2fcb8b60df6641f18c1761908254e19f3
                                flag: U
                                idt: 31-12-2023
                                inum: '78765'
                                inv_typ: R
                                irn: >-
                                  qoycq59t3048fcd0d59cf0eb907b573f32a35d574dd8e00df859078fo3vtf9rn
                                irngendate: 03-01-2024
                                itms:
                                  - itm_det:
                                      camt: 0
                                      csamt: 0
                                      iamt: 242.84
                                      rt: 18
                                      samt: 0
                                      txval: 1349.1
                                    num: 1
                                pos: '07'
                                rchrg: 'N'
                                srctyp: e-Invoice
                                updby: S
                                val: 1591.94
                          - cfs: 'N'
                            ctin: 29ABCCN2123R1YZ
                            inv:
                              - cflag: 'N'
                                chksum: >-
                                  1145dc69e5e5c1ec523c9eaaf1f892cb9f2523affb3d7724adcfd14c2f9e2804
                                flag: U
                                idt: 05-12-2023
                                inum: '78306'
                                inv_typ: R
                                irn: >-
                                  qoycq59t3011f5b90098dab3b6f5266d61d034989ab2f446c1f4cf8fo3vtf9rn
                                irngendate: 03-01-2024
                                itms:
                                  - itm_det:
                                      camt: 0
                                      csamt: 0
                                      iamt: 359.82
                                      rt: 18
                                      samt: 0
                                      txval: 1999
                                    num: 1
                                pos: '29'
                                rchrg: 'N'
                                srctyp: e-Invoice
                                updby: S
                                val: 2358.82
                          - cfs: 'N'
                            ctin: 29ABCPM7123J1YZ
                            inv:
                              - cflag: 'N'
                                chksum: >-
                                  8c63db5e463121ea3940920995500f8b68fafae91eb88628d524f72f31828349
                                flag: U
                                idt: 22-12-2023
                                inum: '78309'
                                inv_typ: R
                                irn: >-
                                  qoycq59t30f42d280bf0b63e7fd6f897d3eb4e499a47be05499e538fo3vtf9rn
                                irngendate: 03-01-2024
                                itms:
                                  - itm_det:
                                      camt: 0
                                      csamt: 0
                                      iamt: 899.82
                                      rt: 18
                                      samt: 0
                                      txval: 4999
                                    num: 1
                                pos: '29'
                                rchrg: 'N'
                                srctyp: e-Invoice
                                updby: S
                                val: 5898.82
                    timestamp: 1763446641000
                    transaction_id: 8a8a7de9-a3bc-42f2-836d-6ddb854fdc94
                RET11416 No data found:
                  summary: RET11416 No data found
                  value:
                    code: 200
                    data:
                      status_cd: '0'
                      error:
                        error_cd: RET11416
                        message: >-
                          No document found in selected financial year. Either
                          this document exists in a different financial year or
                          the document number is incorrect.
                    timestamp: 1763446641000
                    transaction_id: 14714878-95ff-4207-b127-d184f3fa2d6c
                200 Success 2:
                  summary: 200 Success 2
                  value:
                    transaction_id: 41bb8041-fb83-4654-8d75-85a19f329158
                    code: 200
                    data:
                      status_cd: '1'
                      data:
                        b2b:
                          - inv:
                              - val: 4718.82
                                itms:
                                  - num: 1
                                    itm_det:
                                      csamt: 0
                                      samt: 0
                                      rt: 18
                                      txval: 3999
                                      camt: 0
                                      iamt: 719.82
                                flag: U
                                irn: >-
                                  qoycq59t30429eb5dfa38d3b6efa65346dcff127abf439c76e3afd8fo3vtf9rn
                                updby: S
                                irngendate: 03-01-2024
                                inum: '78618'
                                cflag: 'N'
                                inv_typ: R
                                pos: '07'
                                srctyp: E-Invoice
                                idt: 29-12-2023
                                rchrg: 'N'
                                chksum: >-
                                  4b571a762c1c17818ff448fef1d690c95931868b72299f0671936720ba427fcd
                            cfs: 'N'
                            ctin: 07ABCCD6123D1YZ
                          - inv:
                              - val: 1591.94
                                itms:
                                  - num: 1
                                    itm_det:
                                      csamt: 0
                                      samt: 0
                                      rt: 18
                                      txval: 1349.1
                                      camt: 0
                                      iamt: 242.84
                                flag: U
                                irn: >-
                                  qoycq59t3048fcd0d59cf0eb907b573f32a35d574dd8e00df859078fo3vtf9rn
                                updby: S
                                irngendate: 03-01-2024
                                inum: '78765'
                                cflag: 'N'
                                inv_typ: R
                                pos: '07'
                                srctyp: E-Invoice
                                idt: 31-12-2023
                                rchrg: 'N'
                                chksum: >-
                                  d2cd7bfe59317de95d0877e4277c40f2fcb8b60df6641f18c1761908254e19f3
                            cfs: 'N'
                            ctin: 07ABCPA2123G1YZ
                          - inv:
                              - val: 2358.82
                                itms:
                                  - num: 1
                                    itm_det:
                                      csamt: 0
                                      samt: 0
                                      rt: 18
                                      txval: 1999
                                      camt: 0
                                      iamt: 359.82
                                flag: U
                                irn: >-
                                  qoycq59t3011f5b90098dab3b6f5266d61d034989ab2f446c1f4cf8fo3vtf9rn
                                updby: S
                                irngendate: 03-01-2024
                                inum: '78306'
                                cflag: 'N'
                                inv_typ: R
                                pos: '29'
                                srctyp: E-Invoice
                                idt: 05-12-2023
                                rchrg: 'N'
                                chksum: >-
                                  1145dc69e5e5c1ec523c9eaaf1f892cb9f2523affb3d7724adcfd14c2f9e2804
                            cfs: 'N'
                            ctin: 29ABCCN2123R1YZ
                          - inv:
                              - val: 5898.82
                                itms:
                                  - num: 1
                                    itm_det:
                                      csamt: 0
                                      samt: 0
                                      rt: 18
                                      txval: 4999
                                      camt: 0
                                      iamt: 899.82
                                flag: U
                                irn: >-
                                  qoycq59t30f42d280bf0b63e7fd6f897d3eb4e499a47be05499e538fo3vtf9rn
                                updby: S
                                irngendate: 03-01-2024
                                inum: '78309'
                                cflag: 'N'
                                inv_typ: R
                                pos: '29'
                                srctyp: E-Invoice
                                idt: 22-12-2023
                                rchrg: 'N'
                                chksum: >-
                                  8c63db5e463121ea3940920995500f8b68fafae91eb88628d524f72f31828349
                            cfs: 'N'
                            ctin: 29ABCPM7123J1YZ
                    timestamp: 1776921876217
                200 Filtered by counterparty GSTIN 2:
                  summary: 200 Filtered by counterparty GSTIN 2
                  value:
                    transaction_id: 41bb8041-fb83-4654-8d75-85a19f329158
                    code: 200
                    data:
                      status_cd: '1'
                      data:
                        b2b:
                          - inv:
                              - val: 4718.82
                                itms:
                                  - num: 1
                                    itm_det:
                                      csamt: 0
                                      samt: 0
                                      rt: 18
                                      txval: 3999
                                      camt: 0
                                      iamt: 719.82
                                flag: U
                                irn: >-
                                  qoycq59t30429eb5dfa38d3b6efa65346dcff127abf439c76e3afd8fo3vtf9rn
                                updby: S
                                irngendate: 03-01-2024
                                inum: '78618'
                                cflag: 'N'
                                inv_typ: R
                                pos: '07'
                                srctyp: E-Invoice
                                idt: 29-12-2023
                                rchrg: 'N'
                                chksum: >-
                                  4b571a762c1c17818ff448fef1d690c95931868b72299f0671936720ba427fcd
                            cfs: 'N'
                            ctin: 07ABCCD6123D1YZ
                    timestamp: 1776921876217
          headers: {}
      deprecated: false
      security: []
components:
  schemas:
    GetGstr1B2bResponse:
      oneOf:
        - $ref: '#/components/schemas/GetGstr1B2bSuccessResponse'
        - $ref: '#/components/schemas/GstnBusinessErrorResponse'
      description: >-
        A GSTN success or GSTN business-failure response. Both variants use HTTP
        200.
    GetGstr1B2bSuccessResponse:
      allOf:
        - $ref: '#/components/schemas/TaxpayerResponseMetadata'
        - type: object
          required:
            - data
          properties:
            data:
              type: object
              description: The GSTN success wrapper.
              required:
                - status_cd
                - data
              properties:
                status_cd:
                  type: string
                  enum:
                    - '1'
                  description: GSTN success status.
                  example: '1'
                data:
                  $ref: '#/components/schemas/GetGstr1B2bSuccessPayload'
    GstnBusinessErrorResponse:
      type: object
      description: HTTP 200 response containing a GSTN business failure.
      required:
        - code
        - timestamp
        - transaction_id
        - data
      properties:
        code:
          type: integer
          description: The HTTP status code reported in the response body.
          enum:
            - 200
          example: 200
        timestamp:
          type: integer
          format: int64
          description: The response timestamp in Unix epoch milliseconds.
          example: 1763446641000
        transaction_id:
          type: string
          description: The transaction identifier used to trace the request.
          example: 41bb8041-fb83-4654-8d75-85a19f329158
        data:
          type: object
          description: The GSTN business-failure wrapper.
          required:
            - status_cd
            - error
          properties:
            status_cd:
              type: string
              enum:
                - '0'
              description: GSTN business-failure status.
              example: '0'
            error:
              $ref: '#/components/schemas/GstnBusinessError'
    TaxpayerResponseMetadata:
      type: object
      description: Fields included in every taxpayer endpoint response.
      required:
        - code
        - timestamp
        - transaction_id
      properties:
        code:
          type: integer
          description: The HTTP status code reported in the response body.
          enum:
            - 200
          example: 200
        timestamp:
          type: integer
          format: int64
          description: The response timestamp in Unix epoch milliseconds.
          example: 1763446641000
        transaction_id:
          type: string
          description: The transaction identifier used to trace the request.
          example: 41bb8041-fb83-4654-8d75-85a19f329158
    GetGstr1B2bSuccessPayload:
      type: object
      description: Successful GSTN payload for Get Gstr1 B2b.
      properties:
        b2b:
          type: array
          description: The b2b value returned by GSTN.
          items:
            type: object
            properties:
              flag:
                type: string
                description: Status of Invoice
              cfs:
                type: string
                description: GSTR2 filing status of counter party
              ctin:
                type: string
                description: GSTIN/UID of the Receiver taxpayer/UN,Govt Bodies
                minLength: 15
                maxLength: 15
              inv:
                type: array
                description: The inv value returned by GSTN.
                items:
                  type: object
                  properties:
                    cflag:
                      type: string
                      description: Status of counter party
                    etin:
                      type: string
                      description: Ecom Tin
                      minLength: 15
                      maxLength: 15
                    inum:
                      type: string
                      description: Supplier Invoice Number
                      maxLength: 16
                    chksum:
                      type: string
                      description: Invoice checksum value
                      minLength: 1
                      maxLength: 64
                    idt:
                      type: string
                      description: Supplier Invoice Date
                    inv_typ:
                      type: string
                      description: Invoice Type
                    diff_percent:
                      type: number
                      description: Differential percentage
                    opd:
                      type: string
                      description: Original Period
                    srctyp:
                      type: string
                      description: Source Type of Invoice
                    irn:
                      type: string
                      description: Invoice Referrence Number
                      minLength: 64
                      maxLength: 64
                    irngendate:
                      type: string
                      description: IRN Generated Date
                      minLength: 1
                    itms:
                      type: array
                      description: The itms value returned by GSTN.
                      items:
                        type: object
                        properties:
                          itm_det:
                            type: object
                            description: The itm det value returned by GSTN.
                            properties:
                              rt:
                                type: number
                                description: rate as per invoice
                              iamt:
                                type: number
                                description: IGST Amount as per invoice
                              camt:
                                type: number
                                description: CGST Amount as per invoice
                              samt:
                                type: number
                                description: SGST Amount as per invoice
                              csamt:
                                type: number
                                description: Cess Amount as per invoice
                              txval:
                                type: number
                                description: >-
                                  Taxable value of Goods or Service as per
                                  invoice
                          num:
                            type: number
                            description: Serial no
                    pos:
                      type: string
                      description: Actual Place of Supply
                      minLength: 2
                      maxLength: 2
                    rchrg:
                      type: string
                      description: Reverse Charge
                    updby:
                      type: string
                      description: Uploaded by
                    val:
                      type: number
                      description: Supplier Invoice Value
                    flag:
                      type: string
                      description: The flag value returned by GSTN.
                      example: U
    GstnBusinessError:
      type: object
      description: A business error returned by GSTN.
      required:
        - error_cd
        - message
      properties:
        error_cd:
          type: string
          description: The GSTN business error code.
          example: RET11416
        message:
          type: string
          description: A human-readable description of the GSTN business error.
          example: No records found.

````