> ## 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.

# Regenerate GSTR-2B

> Seamlessly regenerate GSTR-2B on-demand with this API. Whenever actions are taken on invoices within the Invoice Management System (IMS), GSTR-2B needs to be regenerated per the latest invoice status (Accepted/Rejected/Pending).

#### Request body schema

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


## OpenAPI

````yaml api-reference/gst/compliance/openapi.json POST /gst/compliance/tax-payer/gstrs/gstr-2b/{year}/{month}/regenerate
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-2b/{year}/{month}/regenerate:
    post:
      tags:
        - Taxpayer
        - Returns
        - GSTR-2B Document
      summary: Regenerate GSTR-2B
      description: >-
        Seamlessly regenerate GSTR-2B on-demand with this API. Whenever actions
        are taken on invoices within the Invoice Management System (IMS),
        GSTR-2B needs to be regenerated per the latest invoice status
        (Accepted/Rejected/Pending).
      operationId: regenerateGstr2b
      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: 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-version
          in: header
          description: API version
          required: false
          example: ''
          schema:
            type: string
            default: 1.0.0
        - name: x-api-key
          in: header
          description: API key for identification
          required: true
          example: '{{api_key}}'
          schema:
            type: string
      responses:
        '200':
          description: >-
            IMS2B007 Incorrect ITC period or 3B already filed / 200 Regeneration
            2B started / IMS2B009 Generate 2b after draft is available
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: number
                    example: 200
                  data:
                    type: object
                    properties:
                      data:
                        type: object
                        properties:
                          reference_id:
                            type: string
                            example: 0032e479bcb644c
                      error:
                        type: object
                        properties:
                          error_cd:
                            type: string
                            example: IMS2B007
                          message:
                            type: string
                            example: >-
                              Either the entered ITC period is incorrect or it
                              has 3B filed
                      status_cd:
                        type: string
                        example: '0'
                  timestamp:
                    type: number
                    example: 1763446641000
                  transaction_id:
                    type: string
                    example: 2834a903-98bc-4262-8532-84dd28071900
              examples:
                200 Regeneration 2B started:
                  summary: 200 Regeneration 2B started
                  value:
                    code: 200
                    data:
                      data:
                        reference_id: 0032e479bcb644c
                      status_cd: '1'
                    timestamp: 1763446641000
                    transaction_id: a0dd3f41-3635-4a7b-96a1-ae4225d2e86b
                IMS2B007 Incorrect ITC period or 3B already filed:
                  summary: IMS2B007 Incorrect ITC period or 3B already filed
                  value:
                    code: 200
                    data:
                      error:
                        error_cd: IMS2B007
                        message: >-
                          Either the entered ITC period is incorrect or it has
                          3B filed
                      status_cd: '0'
                    timestamp: 1763446641000
                    transaction_id: 2834a903-98bc-4262-8532-84dd28071900
                IMS2B009 Generate 2b after draft is available:
                  summary: IMS2B009 Generate 2b after draft is available
                  value:
                    code: 200
                    data:
                      error:
                        error_cd: IMS2B009
                        message: Kindly generate 2b after 14/05/2025
                      status_cd: '0'
                    timestamp: 1747049275882
                    transaction_id: 69370bfe-d986-46a7-8d4e-9dae38fc6d61
          headers: {}
      deprecated: false
      security: []

````