You are on page 1of 48

Developer Guide CUSTOMER

Click here to enter text.

SAP Localization Hub, digital compliance service


REST API Documentation
Typographic Conventions

Type Style Description

Example Words or characters quoted from the screen. These include field names, screen titles,
pushbuttons labels, menu names, menu paths, and menu options.
Textual cross-references to other documents.

Example Emphasized words or expressions.

EXAMPLE Technical names of system objects. These include report names, program names,
transaction codes, table names, and key concepts of a programming language when they
are surrounded by body text, for example, SELECT and INCLUDE.

Example Output on the screen. This includes file and directory names and their paths, messages,
names of variables and parameters, source text, and names of installation, upgrade and
database tools.

Example Exact user entry. These are words or characters that you enter in the system exactly as
they appear in the documentation.

<Example> Variable user entry. Angle brackets indicate that you replace these words and characters
with appropriate entries to make entries in the system.

EXAMPLE Keys on the keyboard, for example, F 2 or E N T E R .

CUSTOMER SAP Localization Hub, digital compliance service


2 2017 SAP SE or an SAP affiliate company. All rights reserved. Typographic Conventions
Contents

1 digital compliance service REST APIs ........................................................................................4


1.1 REST Overview: Outward Supplies (GSTR1) ....................................................................................... 5
1.1.1 REST Method: Upload Invoice .............................................................................................. 6
1.1.2 REST Method: Get Invoice Status ...................................................................................... 16
1.1.3 REST Method: Cancel Invoice ............................................................................................ 18
1.1.4 REST Method: Modify Invoice ............................................................................................ 19
1.1.5 REST Method: Get Acknowledgement ID Status .............................................................24
1.2 REST Overview: Inward Supplies (GSTR-2) ......................................................................................26
1.2.1 REST Method: Upload Invoice ............................................................................................28
1.2.2 REST Method: Get Invoice Status ..................................................................................... 40
1.2.3 REST Method: Cancel Invoice ............................................................................................ 41
1.2.4 REST Method: Modify Invoice ............................................................................................42
1.2.5 REST Method: Get Acknowledgement ID Status .............................................................46

SAP Localization Hub, digital compliance service CUSTOMER


Contents 2017 SAP SE or an SAP affiliate company. All rights reserved. 3
Disclaimer

This document is a draft, and provided as a courtesy. This document is not to be considered final, and all
information cited here is subject to change. As such, this document is not to be quoted, cited in any reference, or
used by anyone for any purpose other than as a draft document.

CUSTOMER SAP Localization Hub, digital compliance service


4 2017 SAP SE or an SAP affiliate company. All rights reserved. digital compliance service REST APIs
1 digital compliance service REST APIs

The digital compliance service provides the following APIs:


Outward Supplies API
Inward Supplies API

1.1 REST Overview: Outward Supplies (GSTR1)

The Outward Supplies API provides methods to create GSTR-1 form for a taxpayer.

Base URI: {GSTR1-EndPoint}/invoice

Methods

HTTP Action URI


Method

GET Get Invoice Status {GSTR1-


Get EndPoint}/invoice?gstin=04AABFN9870CMZT&fp=112016&invnum=559
Acknowledgement 0
ID Status {GSTR1-EndPoint}/invoices?ackNo=f92fc5f6-f2a3-47c2-8281-
d23febd3476e

POST Upload Invoice {GSTR1-EndPoint}/invoices

PUT Modify Invoice {GSTR1-EndPoint}/invoice

DELETE Cancel Invoice {GSTR1-


EndPoint}/invoice?gstin=04AABFN9870CMZT&fp=112016&invnum=559
0

SAP Localization Hub, digital compliance service CUSTOMER


digital compliance service REST APIs 2017 SAP SE or an SAP affiliate company. All rights reserved. 5
Common Headers

Common Request Headers

Header Required Description

content-type Yes application/json

authorization Yes <client ID-token>

Common Response Headers

Header Description

content-type application/json

1.1.1 REST Method: Upload Invoice

Uploads the outward supplies invoice summary from the source system to the GST network.

Request

URI: {GSTR1-EndPoint}/invoices

HTTP Method: POST

Permissions: dcs.sourceAdmin role is required

Request Headers
See Common Request Headers under REST Overview: Outward Supplies.

Header Parameters

Parameter Required Data Type Description

tns_id Yes Alphanumeric Transaction ID

CUSTOMER SAP Localization Hub, digital compliance service


6 2017 SAP SE or an SAP affiliate company. All rights reserved. digital compliance service REST APIs
Payload Data

Parameter Required Data Type Description Example

action Yes String Action of the request action

Data Yes JSON object Content and type


Content: Base 64 encoded
payload data
Type: Mime type

Payload Details

JSON Attribute Format

b2b B2B invoice data

b2c B2C invoice data

exp EXP invoice data

at AT invoice data

cdn CDN invoice data

txpd TXPD invoice data

invnr INVNR invoice data

B2B Invoice Data

Parameter Required Data Type Description Example

gstin Yes Alphanumeric Tax Payer GSTIN 11ADECO9084R5Z4


(15 characters)

fp Yes Numeric (6digit) Financial Period 112016

ctin Yes Alphanumeric Counterparty 11ADECO9084R5Z4


(15 characters) GSTIN

invnum Yes String Invoice number


(max 50
characters)

invdate Yes String (DD-MM- Invoice Date 03-02-2016


YYYY)

invamt Yes Decimal (15,2) Invoice Value 10000.00

niltype Yes Alphabetic Nil rated invoice NR, EX, NG, NA


(2 characters) type

pos No String (length:2) Place of supply 11

SAP Localization Hub, digital compliance service CUSTOMER


digital compliance service REST APIs 2017 SAP SE or an SAP affiliate company. All rights reserved. 7
Parameter Required Data Type Description Example

revchrg No String (length:1) Reverse Charge "Y" / "N"


applicable
applicable

provasmt No String (length:1) Provisional "Y" / "N"


assessment
applicable
applicable

supplierstate Yes String (length:2) Supplier State 11

orginv No String Original Invoice


(max 50 number
characters)

orgdate No String (DD-MM- Original Invoice 02-02-2016


YYYY) Date

List {items} Items Items


(see below)

num Yes Numeric Item number 1

type Yes One Character (G Identifier if Goods G- Goods


or S) or Services S- services

hsnsac Yes Alphanumeric HSN or SAC Code 19059020


(max length: 10)

taxbase Yes Decimal (p,2) Taxable value as 10000.00


per invoice

igstrate No Decimal (p,2) IGST Rate as per 10.00


invoice

igstamt No Decimal (p,2) IGST Amount as 1000.00


per invoice

cgstrate No Decimal (p,2) CGST Rate as per 10.00


invoice

cgstamt No Decimal (p,2) CGST Amount as 1000.00


per invoice

sgstrate No Decimal (p,2) SGST Rate as per 10.00


invoice

sgstamt No Decimal (p,2) SGST Amount as 1000.00


per invoice

CUSTOMER SAP Localization Hub, digital compliance service


8 2017 SAP SE or an SAP affiliate company. All rights reserved. digital compliance service REST APIs
B2C Invoice Data

Parameter Required Data Type Description Example

gstin Yes Alphanumeric Tax Payer GSTIN 11ADECO9084R5Z4


(15 characters)

fp Yes Numeric (6 digit) Financial Period 112016

invnum Yes String (max 50 Invoice number


characters)

invdate Yes String (DD-MM- Invoice Date 03-02-2016


YYYY)

invamt Yes Decimal (15,2) Invoice Value 10000.00

niltype Yes Alphabetic Nil rated invoice NR, EX, NG, NA


(2 characters) type

cname Yes String Counter party


(max length: 90) name

rcvrstate Yes String (length: 2) Receiver State 11

supplierstate Yes String (length: 2) Supplier State 11

pos Yes String (length: 2) Place of supply 11

provasmt No String (length: 1) Provisional "Y" / "N"


assessment
applicable

orginv No String (max 50 Original Invoice


characters) number

orgdate No String (DD-MM- Original Invoice 02-02-2016


YYYY) Date

List {items} Items Items


(see below)

num Yes Numeric Item number 1

type Yes One Character (G Identifier if Goods G- Goods


or S) or Services S- services

hsnsac Yes Alphanumeric (Max HSN or SAC Code 19059020


length: 10)

taxbase Yes Decimal (p,2) Taxable value as 10000.00


per invoice

igstrate No Decimal (p,2) IGST Rate as per 10.00


invoice

igstamt No Decimal (p,2) IGST Amount as 1000.00


per invoice

SAP Localization Hub, digital compliance service CUSTOMER


digital compliance service REST APIs 2017 SAP SE or an SAP affiliate company. All rights reserved. 9
Parameter Required Data Type Description Example

cgstrate No Decimal (p,2) CGST Rate as per 10.00


invoice

cgstamt No Decimal (p,2) CGST Amount as 1000.00


per invoice

sgstrate No Decimal (p,2) SGST Rate as per 10.00


invoice

sgstamt No Decimal (p,2) SGST Amount as 1000.00


per invoice

Export Invoice Data

Parameter Required Data Type Description Example

gstin Yes Alphanumeric Tax Payer GSTIN 11ADECO9084R5Z4


(15 characters)

fp Yes Numeric (6digits) Financial Period 112016

invnum Yes String (max 50 Invoice number


characters)

invdate Yes String (DD-MM- Invoice Date 03-02-2016


YYYY)

invamt Yes Decimal (15,2) Invoice Value 10000.00

sbnum No String (max 50 Shipping Bill No. or


characters) Bill of Export No

sbdt No String (DD-MM- Shipping Bill Date. 02-02-2016


YYYY) or Bill of Export
Date

orginv No String (max 50 Original Invoice


characters) number

orgdate No String (DD-MM- Original Invoice 02-02-2016


YYYY) Date

List {items} Items Items


(see below)

num Yes Numeric Item number 1

type Yes One Character Identifier if Goods G- Goods


(G or S) or Services S- services

hsnsac Yes Alphanumeric HSN or SAC Code 19059020


(max length: 10)

CUSTOMER SAP Localization Hub, digital compliance service


10 2017 SAP SE or an SAP affiliate company. All rights reserved. digital compliance service REST APIs
Parameter Required Data Type Description Example

taxbase Yes Decimal (p,2) Taxable value as 10000.00


per invoice

igstrate No Decimal (p,2) IGST Rate as per 10.00


invoice

igstamt No Decimal (p,2) IGST Amount as 1000.00


per invoice

cgstrate No Decimal (p,2) CGST Rate as per 10.00


invoice

cgstamt No Decimal (p,2) CGST Amount as 1000.00


per invoice

sgstrate No Decimal (p,2) SGST Rate as per 10.00


invoice

sgstamt No Decimal (p,2) SGST Amount as 1000.00


per invoice

Advance Tax Invoice Data

Parameter Required Data Type Description Example

gstin Yes Alphanumeric Tax Payer GSTIN 11ADECO9084R5Z4


(15 characters)

fp Yes Numeric (6digits) Financial Period 112016

ctin Yes Alphanumeric Counter party 12ADECO9084R5Z4


(15 characters) GSTIN

cname Yes String (max length: Counter party


90) name

invnum Yes String (max 50 Invoice number


characters

invdate Yes String (DD-MM- Invoice Date 03-02-2016


YYYY)

invamt Yes Decimal (15,2) Invoice Value 10000.00

invtype Yes String (length:3) Invoice type "B2B" / "B2C"

rcvrstate Yes String (length:2) Receiver State 11

orginv No String (max 50 Original Invoice


characters) number

orgdate No String (DD-MM- Original Invoice 02-02-2016


YYYY) Date

SAP Localization Hub, digital compliance service CUSTOMER


digital compliance service REST APIs 2017 SAP SE or an SAP affiliate company. All rights reserved. 11
Parameter Required Data Type Description Example

List {items} Items Items


(see below)

num Yes Numeric Item number 1

type Yes One Character Identifier if Goods G- Goods


(G or S) or Services S- services

hsnsac Yes Alphanumeric HSN or SAC Code 19059020


(max length: 10)

taxbase Yes Decimal (p,2) Taxable value as 10000.00


per invoice

igstrate No Decimal (p,2) IGST Rate as per 10.00


invoice

igstamt No Decimal (p,2) IGST Amount as 1000.00


per invoice

cgstrate No Decimal (p,2) CGST Rate as per 10.00


invoice

cgstamt No Decimal (p,2) CGST Amount as 1000.00


per invoice

sgstrate No Decimal (p,2) SGST Rate as per 10.00


invoice

sgstamt No Decimal (p,2) SGST Amount as 1000.00


per invoice

Credit Note and Debit Note Data

Parameter Required Data Type Description Example

gstin Yes Alphanumeric Tax Payer GSTIN 11ADECO9084R5Z4


(15 characters)

fp Yes Numeric (6 digits) Financial Period 112016

cdnnum Yes Numeric Credit/Debit note 100001


(max length:10) number

cdndate Yes String (DD-MM- Credit/Debit note 03-02-2016


YYYY) date

cdntype Yes String (length: 2) Credit/Debit note "CR" / "DR"


type

CUSTOMER SAP Localization Hub, digital compliance service


12 2017 SAP SE or an SAP affiliate company. All rights reserved. digital compliance service REST APIs
Parameter Required Data Type Description Example

reason No String Reason Code for Balance


(max length: 30) issuing
Debit/Credit Note

orgcdn No Numeric Original


(max length: 10) Credit/Debit
number

orgdate No String (DD-MM- Original 02-02-2016


YYYY) Credit/Debit Date

List {items} Items Items


(see below)

inv Yes String (max 50 Invoice number


characters)

date Yes String (DD-MM- Invoice Date 03-02-2016


YYYY)

ctin No Alphanumeric Counterparty 11ADECO9084R5Z4


(15 characters) GSTIN

cname Yes String Counter party


(max length: 90) name

type Yes String (length: 3) Invoice type "B2B" / "B2C"

taxbase Yes Decimal (p,2) Taxable value as 10000.00


per invoice

igstrate No Decimal (p,2) IGST Rate as per 10.00


invoice

igstamt No Decimal (p,2) IGST Amount as 1000.00


per invoice

cgstrate No Decimal (p,2) CGST Rate as per 10.00


invoice

cgstamt No Decimal (p,2) CGST Amount as 1000.00


per invoice

sgstrate No Decimal (p,2) SGST Rate as per 10.00


invoice

sgstamt No Decimal (p,2) SGST Amount as 1000.00


per invoice

SAP Localization Hub, digital compliance service CUSTOMER


digital compliance service REST APIs 2017 SAP SE or an SAP affiliate company. All rights reserved. 13
Tax Paid Invoice Data

Parameter Required Data Type Description Example

gstin Yes Alphanumeric Tax Payer GSTIN 11ADECO9084R5Z4


(15 characters)

fp Yes Numeric (6 digits) Financial Period 112016

invnum Yes String (max 50 Clearing Document


characters) number

invdate Yes String (DD-MM- Clearing Document 03-02-2016


YYYY) Date

advinvnum Yes String (max 50 Advance Payment


characters) Invoice number

advinvdate Yes String (DD-MM- Advance Payment 03-02-2016


YYYY) Invoice Date

cinvnum Yes String (max 50 Customer Invoice


characters) number

cinvdate Yes String (DD-MM- Customer Invoice 03-02-2016


YYYY) Date

taxbase Yes Decimal (p,2) Taxable value of 10000.00


Goods or Service
as per invoice

igstrate No Decimal (p,2) IGST Rate as per 10.00


invoice

igstamt No Decimal (p,2) IGST Amount as 1000.00


per invoice

cgstrate No Decimal (p,2) CGST Rate as per 10.00


invoice

cgstamt No Decimal (p,2) CGST Amount as 1000.00


per invoice

sgstrate No Decimal (p,2) SGST Rate as per 10.00


invoice

sgstamt No Decimal (p,2) SGST Amount as 1000.00


per invoice

CUSTOMER SAP Localization Hub, digital compliance service


14 2017 SAP SE or an SAP affiliate company. All rights reserved. digital compliance service REST APIs
Invoice Number Range Data

Parameter Required Data Type Description Example

gstin Yes Alphanumeric Tax Payer GSTIN 11ADECO9084R5Z4


(15 characters)

fp Yes Numeric (6digits) Financial Period 112016

nrseries String (max 50 Number range 1233


characters) series

fromnum String (max 50 number range from 1233400


characters)

tonum String (max 50 number range to 1233900


characters)

totalinv Numeric Total number of 450


invoices

cancinv Numeric Total number of 0


canceled invoices

netissuedinv Numeric Total number of 450


net/issued invoices

Request Example
{
"action": "UPLOAD",
"data": {
"content":

"eyAgDQoiYjJiIjogew0KICAgICJiMmJpbnZvaWNlcyI6IFsNCiAgICAgIHsNCiAgICJnc3RpbiI6IjExREREREQwMDAw
RDFaNSIsDQogICAiZnAiOiIxMjIwMTYiLA0KICAgImN0aW4iOiIyMkREREREMDAwMEQxWjUiLA0KICAgImludm51b
SI6IklOVjU1NSIsDQogICAiaW52ZGF0ZSI6IjIzLTEwLTIwMTYiLA0KICAgIm5pbHR5cGUiOiJORyIsDQogICAiaW52Y
W10Ijo1MDAuMTYsDQogICAicG9zIjoiMjciLA0KICAgInJldmNocmciOiJOIiwNCiAgICJwcm92YXNtdCI6Ik4iLA0KIC
AgInN1cHBsaWVyc3RhdGUiOiIwMyIsDQogICAiaXRlbXMiOlsNCiAgICAgew0KCSAgICJudW0iOjEsDQoJICAgInR5c
GUiOiJHIiwNCgkgICAiaHNuc2FjIjoiRzEyMjEiLA0KCSAgICJ0YXhiYXNlIjoxMDAwLA0KCSAgICJpZ3N0cmF0ZSI6
MCwNCgkgICAiaWdzdGFtdCI6MCwNCgkgICAiY2dzdHJhdGUiOjEwLA0KCSAgICJjZ3N0YW10Ijo4MDAwLA0KCS
AgICJzZ3N0cmF0ZSI6MTAsDQoJICAgInNnc3RhbXQiOjgwMDANCgkgfQ0KICAgIF0NCiAgICAgIH0NCiAgICBdD
QogIH0NCn0="
,
"type": "application/json"
}
}

SAP Localization Hub, digital compliance service CUSTOMER


digital compliance service REST APIs 2017 SAP SE or an SAP affiliate company. All rights reserved. 15
Response

Content type: JSON

Response Parameters

Parameter Data Type Description Values

ackNo Alphanumeric Acknowledgement ID 9e7a94ae-5f73-451a-


995f-1229cd9a0f67

statuscd String Status of the request 1

Response Example
{
"ackNo": "824cc484-49bd-4972-9185-0ef7f82e0e16",
"statuscd": "1"
}

1.1.2 REST Method: Get Invoice Status

Gets the status of the invoice.

Request

URI: {GSTR2-EndPoint}/invoice?gstin=04AABFN9870CMZT&fp=112016&invnum=5590

HTTP Method: GET

Permissions: dcs.sourceAdmin role is required

URI Parameters

Parameter Required Data Type Description Example

gstin Yes Alphanumeric Tax Payer GSTIN 06ADECO9084R5Z


(15 characters) 4

fp Yes Numeric Financial Period 112016


(6 digits)

invnum Yes Alphanumeric Invoice Number S00401


(max 50
characters)

CUSTOMER SAP Localization Hub, digital compliance service


16 2017 SAP SE or an SAP affiliate company. All rights reserved. digital compliance service REST APIs
Response

Content type: JSON

Response Parameters

Parameter Data Type Description Example

gstin Alphanumeric Supplier GSTIN 06ADECO9084R5Z4


(15 characters)

invnum Alphanumeric Invoice Number S00401


(max 50 characters)

status Alphabetic Invoice Status SENT


(15 characters)

Response Example
{
"status": "PART_UPLDD",
"error": {
"b2berror": [],
"b2cerror": [],
"experror": [],
"aterror": [],
"cdnerror": [
{
"gstin": "04AABFN9870CMZT",
"fp": "112016",
"invnum": "669",
"invdate": "25-10-2017",
"errors": [
{
"errorcode": "VAL_SUMMARY_DUP_INV",
"errormsg": "Duplicate INVOICE: Invoice number already exists."
}
]
}
],
"txpderror": [],
"invnrerror": []
}

SAP Localization Hub, digital compliance service CUSTOMER


digital compliance service REST APIs 2017 SAP SE or an SAP affiliate company. All rights reserved. 17
1.1.3 REST Method: Cancel Invoice

Cancels an invoice.

Request

URI: {GSTR2-EndPoint}/invoice?gstin=04AABFN9870CMZT&fp=112016&invnum=5590

HTTP Method: DELETE

Permissions: dcs.sourceAdmin role is required

Header Parameters

Parameter Required Data Type Description Example

tns_id Yes Alphanumeric Transaction ID

URI Parameters

Parameter Required Data Type Description Example

gstin Yes Alphanumeric Supplier GSTIN 06ADECO9084R5Z


(15 characters) 4

fp Yes Numeric (6 digit) Financial Period 112016

invnum Yes Alphanumeric Invoice Number S00401


(max 50 characters)

Response

Content type: JSON

Response Parameters

Parameter Data Type Description Example

ackNo Alphanumeric Acknowledgement of d7723e62-73ce-49b7-


(36 characters) Cancel request befb-9663472ccc79

status Alphabetic Request Status Success/Failed

CUSTOMER SAP Localization Hub, digital compliance service


18 2017 SAP SE or an SAP affiliate company. All rights reserved. digital compliance service REST APIs
Response Example

If invoice is cancelled
{
"status": "Success",
"message": {
"code": "INVOICE-C-005",
"description": "Canceled successfully."
},
"ackNo": "b1279d29-4be9-488f-be15-29d3cc8ffcd2"
}

1.1.4 REST Method: Modify Invoice

Modifies an invoice.

Request

URI: {GSTR1-EndPoint}/invoice

HTTP Method: PUT

Permissions: dcs.sourceAdmin role is required

URI Parameters

Parameter Required Data Type Description Example

tns_id Yes Alphanumeric Transaction ID 68d43e5b-0ffa-


(36 characters) 4a14-bf6a-
ad74ec160e2c

invoice_type Yes Alphanumeric Invoice type b2b, b2c, exp, at,


cdn, txpd

Request Payload Details

Parameter Description Reference

b2b b2b invoice payload invoice_type=b2b

b2c b2c invoice payload invoice_type=b2c

exp exp invoice payload invoice_type=exp

SAP Localization Hub, digital compliance service CUSTOMER


digital compliance service REST APIs 2017 SAP SE or an SAP affiliate company. All rights reserved. 19
Parameter Description Reference

at at invoice payload invoice_type=at

cdn txi invoice payload invoice_type=cdn

txpd txpd invoice payload invoice_type=txpd

For more information, see Payload Details in Upload Invoice.

Request Example
{
"gstin":"66DDDDD0000D1Z5",
"fp":"042017",
"ctin":"22DDDDD0000D1Z5",
"invnum":"INV5552",
"invdate":"23-10-2016",
"niltype":"NG",
"invamt":500.16,
"pos":"27",
"revchrg":"N",
"provasmt":"N",
"supplierstate":"03",

"items":[
{
"num":1,
"type":"G",
"hsnsac":"G1221",
"taxbase":800,
"igstrate":0,
"igstamt":0,
"cgstrate":10,
"cgstamt":80,
"sgstrate":10,
"sgstamt":80
}
]
}

CUSTOMER SAP Localization Hub, digital compliance service


20 2017 SAP SE or an SAP affiliate company. All rights reserved. digital compliance service REST APIs
Response

Content type: JSON

Response Parameters

Parameter Required Data Type Description Example

status Status of Alphabatic status Success/Failed


Acknowledgement

Error Details

Parameter Description

List{b2berror} B2B Invoice error details

List{b2cerror} B2C Invoice error details

List{experror} Exports error details

List{aterror} Advance Tax error details

List{cdnerror} Credit Debit Note error details

List{txpderror} TXPD Invoice error details

B2B invoice error details

Parameter Data Type Description Example

gstin Alphanumeric Tax Payer GSTIN 11ADECO9084R5Z4


(15 characters)

fp Numeric Financial Period 112016


(6 digits)

invnum String Invoice number


(max 50 characters)

invdate String (DD-MM-YYYY) Invoice Date 03-02-2016

orginv String Original Invoice number


(max 50 characters)

orgdate String (DD-MM-YYYY) Original Invoice Date 02-02-2016

B2C invoice error details

Parameter Data Type Description Example

gstin Alphanumeric Tax Payer GSTIN


11ADECO9084R5Z4
(15 characters)

SAP Localization Hub, digital compliance service CUSTOMER


digital compliance service REST APIs 2017 SAP SE or an SAP affiliate company. All rights reserved. 21
Parameter Data Type Description Example

fp Numeric Financial Period 112016


(6 digits)

invnum String Invoice number


(max 50 characters)

invdate String (DD-MM-YYYY) Invoice Date 03-02-2016

orginv String Original Invoice number


(max 50 characters)

orgdate String (DD-MM-YYYY) Original Invoice Date 02-02-2016

Exports error details

Parameter Data Type Description Example

gstin Alphanumeric Tax Payer GSTIN


11ADECO9084R5Z4
(15 characters)

fp Numeric (6 digits) Financial Period 112016

invnum String (max 50 Invoice number


characters)

invdate String (DD-MM-YYYY) Invoice Date 03-02-2016

sbnum String (max 50 Shipping Bill No. or Bill of


characters) Export No

sbdt String (DD-MM-YYYY) Shipping Bill Date. or Bill 02-02-2016


of Export Date

orginv String Original Invoice number


(max 50 characters)

orgdate String (DD-MM-YYYY) Original Invoice Date 02-02-2016

Advance tax error details

Parameter Data Type Description Example

gstin Alphanumeric Tax Payer GSTIN 11ADECO9084R5Z4


(15 characters)

fp Numeric (6 digits) Financial Period 112016

invnum String (max 50 Invoice number


characters)

invdate String (DD-MM-YYYY) Invoice Date 03-02-2016

orginv String (max 50 Original Invoice number


characters)

orgdate String (DD-MM-YYYY) Original Invoice Date 02-02-2016

CUSTOMER SAP Localization Hub, digital compliance service


22 2017 SAP SE or an SAP affiliate company. All rights reserved. digital compliance service REST APIs
Credit and Debit Note error details

Parameter Data Type Description Example

gstin Alphanumeric Tax Payer GSTIN 11ADECO9084R5Z4


(15 characters)

fp Numeric (6 digits) Financial Period 112016

cdnnum Numeric (max length:10) Credit/Debit note 100002


number

cdndate String (DD-MM-YYYY) Credit/Debit note date 03-02-2016

orgcdn Numeric Original Credit/Debit 100001


(max length: 10) number

orgdate String (DD-MM-YYYY) Original Credit/Debit 02-02-2016


Date

Tax paid invoice error details

Parameter Data Type Description Example

gstin Alphanumeric Tax Payer GSTIN 11ADECO9084R5Z4


(15 characters)

fp Numeric (6 digits) Financial Period 112016

invnum String (max 50 Invoice number


characters)

invdate String (DD-MM-YYYY) Invoice Date 03-02-2016

advinvnum String (max 50 Invoice number


characters)

advinvdate String (DD-MM-YYYY) Invoice Date 03-02-2016

cinvnum String (max 50 Invoice number


characters)

cinvdate String (DD-MM-YYYY) Invoice Date 03-02-2016

Error details
Parameter Data Type Description Example

errorcode Aphanumeric code of the error VAL_SUMMARY_FP

errormsg Aphanumeric Description of the error Invalid FP: The financial


period is not opened for
Invoice Save.

SAP Localization Hub, digital compliance service CUSTOMER


digital compliance service REST APIs 2017 SAP SE or an SAP affiliate company. All rights reserved. 23
Response example
If invoice is modified
{
"status": "Success",
"ackNo": "831bf2e7-20bb-4a7b-8410-e8c11eb27ad0"
}

1.1.5 REST Method: Get Acknowledgement ID Status

Gets the status of the acknowledgement ID.

Request

URI: {GSTR1-EndPoint}/invoices?ackNo=f92fc5f6-f2a3-47c2-8281-d23febd3476e

HTTP Method: GET

Permissions: dcs.sourceAdmin role is required

URI Parameters

Parameter Required Data Type Description Example

ackNo Yes Alphanumeric Acknowledgement f92fc5f6-f2a3-


(36 characters) Number 47c2-8281-
d23febd3476e

Response

Content type: JSON

Response Parameters

Parameter Data Type Description Example

status String (max length: 10) Status of UPLDD / PART_UPLDD /


acknowledgement ERROR

Error Details

See Error Details in Rest Method: Modify Invoice.

CUSTOMER SAP Localization Hub, digital compliance service


24 2017 SAP SE or an SAP affiliate company. All rights reserved. digital compliance service REST APIs
Response Example
If few invoices in the summary have errors, while the rest are successful
{
"status": "PART_UPLDD",
"error": {
"b2berror": [],
"b2cerror": [],
"experror": [],
"aterror": [],
"cdnerror": [
{
"gstin": "04AABFN9870CMZT",
"fp": "112016",
"invnum": "669",
"invdate": "25-10-2017",
"errors": [
{
"errorcode": "VAL_SUMMARY_DUP_INV",
"errormsg": "Duplicate INVOICE: Invoice number already exists."
}
]
}
],
"txpderror": [],
"invnrerror": []
}

SAP Localization Hub, digital compliance service CUSTOMER


digital compliance service REST APIs 2017 SAP SE or an SAP affiliate company. All rights reserved. 25
1.2 REST Overview: Inward Supplies (GSTR-2)

The Inward Supplies API provides methods to create GSTR-2 form for a taxpayer.

Base URI: {GSTR2-EndPoint}/invoice

Methods

HTTP Action URI


Method

GET Get Invoice Status {GSTR2-


Get EndPoint}/invoice?gstin=04AABFN9870CMZT&fp=112016&invnum=559
Acknowledgement 0
ID Status GSTR2-EndPoint}/invoices?ackNo=f92fc5f6-f2a3-47c2-8281-
d23febd3476e

POST Upload Invoice {GSTR2-EndPoint}/invoices

PUT Modify Invoice {GSTR2-EndPoint}/invoice

DELETE Cancel Invoice {GSTR2-


EndPoint}/invoice?gstin=04AABFN9870CMZT&fp=112016&invnum=559
0

GET Get Invoice Status {GSTR2-


Get EndPoint}/invoice?gstin=04AABFN9870CMZT&fp=112016&invnum=559
Acknowledgement 0
ID Status GSTR2-EndPoint}/invoices?ackNo=f92fc5f6-f2a3-47c2-8281-
d23febd3476e

Common Headers

Common Request Headers

Header Required Description

content-type Yes application/json

authorization Yes <client ID-token>

Common Response Headers

Header Description

content-type application/json

CUSTOMER SAP Localization Hub, digital compliance service


26 2017 SAP SE or an SAP affiliate company. All rights reserved. digital compliance service REST APIs
SAP Localization Hub, digital compliance service CUSTOMER
digital compliance service REST APIs 2017 SAP SE or an SAP affiliate company. All rights reserved. 27
1.2.1 REST Method: Upload Invoice

Uploads the outward supplies invoice summary from the source system to the GST network.

Request

URI: {GSTR2-EndPoint}/invoices

HTTP Method: POST

Permissions: dcs.sourceAdmin role is required

Header Parameters

Header Required Data Type Description

tns_id Yes Alphanumeric Transaction ID


(max 32 characters)

src_sys_id Yes Alphabetic Source System ID

src_ip_address Yes Numeric Source IP Address

Payload Data

Parameter Required Data Type Description Example

action Yes String Action of the UPLOAD


request

Data Yes JSON object Content and type Type:


Content: Base 64 application/json
encoded payload
data
Type: Mime type

Base 64 encoded payload data

JSON Attribute Format

b2b B2B invoice data

imp_g Import of goods

imp_s Import of services bills

cdn CDN Invoices

CUSTOMER SAP Localization Hub, digital compliance service


28 2017 SAP SE or an SAP affiliate company. All rights reserved. digital compliance service REST APIs
JSON Attribute Format

txi Tax Liability under reverse charge

txpd Tax Paid Under Reverse Charge

B2B Invoice Data

Parameter Required Data Type Description Example

gstin Yes Alphanumeric Customer GSTIN 06ADECO9084R5Z


(15 characters) 4

supp_gstin Yes Alphanumeric Supplier GSTIN 06ADECO9084R5Z


(15 characters) 4

auth_object Yes Alphanumeric Authentication Object IXXX663


(50 characters)

fp Yes Numeric (6 digit) Financial Period 112016

inum Yes Alphanumeric Invoice number


(max 50
characters)

Idt Yes String (DD-MM- Supplier Invoice Date 03-02-2016


YYYY)

niltype No Alphanbetic Nil rated type NR, EX, NG


(2 characters)

Val Yes Decimal (15, 2) Supplier Invoice Value 10000.00

rchrg No String Reverse Charge "Y/N"

pos No String Place of supply 11


(max length:2)

orginv No Alphanumeric Original Invoice number


(max 50
characters)

orgdate No String (DD-MM- Original Invoice Date 03-02-2016


YYYY)

List {items} Items Items


(see below)

num No Number Serial no 1

ty No One Character Identifier if Goods or Services G- Goods


(G or S) S- services

SAP Localization Hub, digital compliance service CUSTOMER


digital compliance service REST APIs 2017 SAP SE or an SAP affiliate company. All rights reserved. 29
Parameter Required Data Type Description Example

hsn_sc No Alphanumeric HSN or SAC of Goods or Services as 19059020


(max length: 10) per Invoice line items

txval No Decimal (15,2) Taxable value of Goods or Service as 10000.00


per invoice

irt No Decimal (5,3) IGST Rate as per invoice 10.00

iamt No Decimal (15,2) IGST Amount as per invoice 1000.00

crt No Decimal (5,3) CGST Rate as per invoice 10.00

camt No Decimal (15,2) CGST Amount as per invoice 1000.00

srt No Decimal (5,3) SGST Rate as per invoice 10.00

samt No Decimal (15,2) SGST Amount as per invoice 1000.00

csrt No Decimal (5,3) CESS Rate as per invoice 10.00

csamt No Decimal (15,2) CESS Amount as per invoice 1000.00

No Decimal (15,2) Total Tax available as ITC IGST 0.00


tx_i
Amount

No Decimal (15,2) Total Tax available as ITC CGST 147.80


tx_c
Amount

tx_s No Decimal (15,2) Total Tax available as ITC SGST 156.90


Amount

No Decimal (15,2) Total Tax available as ITC CESS 156.90


tx_cs
Amount

No Decimal (15,2) Total Input Tax Credit available for 0.00


tc_i claim this month based on the
Invoices uploaded(IGST Amount)

No Decimal (15,2) Total Input Tax Credit available for 7896.30


tc_c claim this month based on the
Invoices uploaded(CGST Amount)

No Decimal (15,2) Total Input Tax Credit available for 4563.20


tc_s claim this month based on the
Invoices uploaded(SGST Amount)

No Decimal (15,2) Total Input Tax Credit available for 4563.20


tc_cs claim this month based on the
Invoices uploaded(SGST Amount)

No String (max Eligibility ip/cp/no


elg
length: 2)

CUSTOMER SAP Localization Hub, digital compliance service


30 2017 SAP SE or an SAP affiliate company. All rights reserved. digital compliance service REST APIs
Import Goods Invoice Data

Parameter Required Data Type Description Example

gstin Yes Alphanumeric Customer GSTIN 06ADECO9084R5Z


(15 characters) 4

supp_gstin Yes Alphanumeric Supplier GSTIN 06ADECO9084R5Z5


(15 characters)

auth_object Yes Alphanumeric Authentication IXXX663


(50 characters) Object

fp Yes Numeric (6 digit) Financial Period 112016

Yes Numeric Bill of Entry 538610200


boe_num
(max length: 50) Number

No Sstring (DD-MM- Bill of Entry Date 03-02-2016


boe_dt
YYYY)

No Numeric Original Bill of 538610200


oboe_num
(max length: 50) Entry Number

No String (DD-MM- Original Bill of 03-02-2016


oboe_dt
YYYY) Entry Date

boe_val No Decimal (15,2) Bill of Entry Value 1000.00

port_code No String Port Code 2A

List {items} Items Items


(see below)

num No Numeric Serial no 1

No Alphanumeric HSN code S440003


hsn_sc
(max length: 10)

txval No Decimal (15,2) Taxable value 10000.00

irt No Decimal (15,2) IGST rate 10.00

iamt No Decimal (15,2) IGST amount 1000.00

csrt No Decimal (15,2) CESS rate 10.00

csamt No Decimal (15,2) CESS amount 1000.00

No String Eligibility for ITC ip/cp/no


elg
(max length: 2)

No Decimal (15,2) Total IGST 0.00


tx_i
available as ITC

No Decimal (15,2) ITC available this 147.80


tc_i
month

SAP Localization Hub, digital compliance service CUSTOMER


digital compliance service REST APIs 2017 SAP SE or an SAP affiliate company. All rights reserved. 31
Parameter Required Data Type Description Example

No Decimal (15,2) Total CESS 0.00


tx_cs available as ITC

No Decimal (15,2) ITC available as 147.80


tc_cs
CESS this month

Import Services Invoice Data

Parameter Required Data Type Description Example

gstin Yes Alphanumeric Customer GSTIN 06ADECO9084R5Z


(15 characters) 4

supp_gstin Yes Alphanumeric Supplier GSTIN 06ADECO9084R5Z5


(15 characters)

auth_object Yes Alphanumeric Authentication IXXX663


(50 characters) Object

fp Yes Numeric (6 digit) Financial Period 112016

Yes Numeric (max Invoice No. 538610200


i_num
length: 50)

No String (DD-MM- Invoice Date 03-02-2016


i_dt
YYYY)

No Numeric (max Original Invoice No. 538610200


oi_num
length: 50)

No String (DD-MM- Original Invoice 03-02-2016


oi_dt
YYYY) Date

ival No Decimal (15,2) Invoice Value 1000.00

List {items} Items Items


(see below)

num No Numeric Serial no 1

No Alphanumeric SAC code S440003


sac
(max length: 10)

txval No Decimal (15,2) Taxable value 10000.00

irt No Decimal (15,2) IGST rate 10.00

iamt No Decimal (15,2) IGST amount 1000.00

csrt No Decimal (15,2) CESS rate 10.00

csamt No Decimal (15,2) CESS amount 1000.00

No String Eligibility for ITC ip/cp/no


elg
(max length: 2)

CUSTOMER SAP Localization Hub, digital compliance service


32 2017 SAP SE or an SAP affiliate company. All rights reserved. digital compliance service REST APIs
Parameter Required Data Type Description Example

No Decimal (15,2) Total ITC 0.00


tx_i
admissible

No Decimal (15,2) ITC admissible this 147.80


tc_i
month

No Decimal (15,2) Total CESS 0.00


tx_cs available as ITC

No Decimal (15,2) ITC available as 147.80


tc_cs
CESS this month

Credit Note and Debit Note Data

Parameter Required Data Type Description Example

Yes Alphanumeric Customer GSTIN 06ADECO9084R5Z4


gstin (15 characters)

supp_gstin Yes Alphanumeric Supplier GSTIN 06ADECO9084R5Z5


(15 characters)

auth_object Yes Alphanumeric Authentication Object IXXX663


(50 characters)

fp Yes Numeric (6 digit) Financial Period 112016

Yes Alphanumeric Debit/Credit Note number 00004


nt_num
(max length: 50)

nt_dt Yes String (DD-MM-YYYY) Credit/Debit date 42526

ntty Yes String Note type C/D

No Alphanumeric Invoice Number 53065


inum
(max length: 50)

No String (max Reason for issuing debit/credit Reason for issuing


reason
length:30) note note

tabname No Supplier/Receiver

updby No Supplier/Receiver

No Alphanumeric (Max Original Debit/Credit Note 00004


ont_num
length:50) number

ont_dt No string (DD-MM-YYYY) original Credit/Debit date 42526

List {items} Items Items


(see below)

No Alphanumeric (max Invoice number


inum 00004
length: 50)

SAP Localization Hub, digital compliance service CUSTOMER


digital compliance service REST APIs 2017 SAP SE or an SAP affiliate company. All rights reserved. 33
Parameter Required Data Type Description Example

idt No String (DD-MM-YYYY) invoice date 42526

No Alphanumeric Customer GSTIN


06ADECO9084R5Z4
ctin (15 characters)

No Alphanumeric Customer Name


cname (max 255 characters)

No Alphanumeric Invoice type


B2B
type (max 10 characters)

taxbase No Decimal (15,2) Taxable amount 682.9

irt No Decimal (15,2) IGST Rate as per invoice 22-03-1900

iamt No Decimal (15,2) IGST Amount as per invoice 682.9

crt No Decimal (15,2) CGST Rate as per invoice 0

camt No Decimal (15,2) CGST Amount as per invoice 0

srt No Decimal (15,2) SGST Rate as per invoice 0

samt No Decimal (15,2) SGST Amount as per invoice 0

csrt No Decimal (15,2) CESS Rate as per invoice 0

csamt No Decimal (15,2) CESS Amount as per invoice 0

elg No String (max length: 2) Eligibility ip/cp/no

rchrg No String Reverse Charge Y/N

No Decimal (15,2) Total Tax available as ITC IGST


tx_i 156.90
Amount

No Decimal (15,2) Total Tax available as ITC CGST


tx_c 156.90
Amount

No Decimal (15,2) Total Tax available as ITC SGST


tx_s 156.90
Amount

No Decimal (15,2) Total Tax available as ITC CESS


tx_cs 156.90
Amount

No Decimal (15,2) Total Input Tax Credit available


for claim this month based on
tc_i 0.00
the Invoices uploaded (IGST
Amount)

No Decimal (15,2) Total Input Tax Credit available


for claim this month based on
tc_c 7896.30
the Invoices uploaded (CGST
Amount)

No Decimal (15,2) Total Input Tax Credit available


tc_s 4563.20
for claim this month based on

CUSTOMER SAP Localization Hub, digital compliance service


34 2017 SAP SE or an SAP affiliate company. All rights reserved. digital compliance service REST APIs
Parameter Required Data Type Description Example
the Invoices uploaded (SGST
Amount)

No Decimal (15,2) Total Input Tax Credit available


for claim this month based on
tc_cs 4563.20
the Invoices uploaded (SGST
Amount)

SAP Localization Hub, digital compliance service CUSTOMER


digital compliance service REST APIs 2017 SAP SE or an SAP affiliate company. All rights reserved. 35
Tax Liability Invoice Data

Parameter Required Data Type Description Example

gstin Yes Alphanumeric Customer GSTIN 06ADECO9084R5Z


(15 characters) 4

supp_gstin Yes Alphanumeric Supplier GSTIN


06ADECO9084R5Z5
(15 characters)

auth_object Yes Alphanumeric Authentication IXXX663


(50 characters) Object

fp Yes Numeric (6 digit) Financial Period 112016

cpty No String Counter party 30ABCDE3304F2Z6


(max length: 30)

reg_type No String Registration Type "REGD/UNREGD"

No String Invoice Check sum AflJufPlFStqKBZ


chksum (max length: 64) value

state_cd No String Placeof supply 11


(max length: 2) State Code

dnum Yes Alphanumeric Supplier Document A100052


(max length: 10) Number

dt No String (DD-MM- Supplier Document 21-03-2016


YYYY) Date

ocpty No String Original Counter 30ABCDE3304F2Z6


(max length :30) party

oreg_type No String Original "REGD/UNREGD"


Registration Type

odnum No Alphanumeric Original Supplier A100052


(max length: 10) Document Number

odt No String (DD-MM- Original Supplier 21-03-2016


YYYY) Document Date

List {items} Items Items


(see below)

num No Numeric Serial no 1

ty No One Character Identifier if Goods G- Goods, S-


(G or S) or Services services

hsn_sc No Alphanumeric HSN or SAC of ASLHk524


(max length: 10) Goods or Services
as per Invoice line
items

CUSTOMER SAP Localization Hub, digital compliance service


36 2017 SAP SE or an SAP affiliate company. All rights reserved. digital compliance service REST APIs
Parameter Required Data Type Description Example

txval No Decimal (15,2) Taxable value of 10000


Goods or Service
as per invoice

Irt No Decimal (15,2) IGST Rate as per 10


invoice

iamt No Decimal (15,2) IGST Amount as 1000


per invoice

crt No Decimal (15,2) CGST Rate as per 10


invoice

camt No Decimal (15,2) CGST Amount as 1000


per invoice

srt No Decimal (15,2) SGST Rate as per 10


invoice

samt No Decimal (15,2) SGST Amount as 1000


per invoice

csrt No Decimal (15,2) Cess Rate as per 10


invoice

csamt No Decimal (15,2) Cess Amount as 1000


per invoice

Tax Paid Invoice Data

Parameter Required Data Type Description Example

gstin Yes Alphanumeric Customer GSTIN 06ADECO9084R5Z


(15 characters) 4

supp_gstin Yes Alphanumeric Supplier GSTIN 06ADECO9084R5Z5


(15 characters)

auth_object Yes Alphanumeric Authentication IXXX663


(50 characters) Object

fp Yes Numeric (6 digit) Financial Period 112016

No Alphanumeric Invoice Number A88017


i_num
(max length: 10)

No String (DD-MM- Invoice date 42405


i_dt
YYYY)

List {items} Items Items


(see below)

SAP Localization Hub, digital compliance service CUSTOMER


digital compliance service REST APIs 2017 SAP SE or an SAP affiliate company. All rights reserved. 37
Parameter Required Data Type Description Example

No Alphanumeric Document Number 100012


doc_num
(max length: 50)

No IGST Rate as per 9.8


irt Decimal (15,2)
invoice

No IGST Amount as 0
iamt Decimal (15,2)
per invoice

No CGST Rate as per 3.5


crt Decimal (15,2)
invoice

No CGST Amount as 582.88


camt Decimal (15,2)
per invoice

No SGST Rate as per 3.5


srt Decimal (15,2)
invoice

No SGST Amount as 6834.9


samt Decimal (15,2)
per invoice

No CESS Rate as per 0


csrt Decimal (15,2)
invoice

No CESS Amount as 0
csamt Decimal (15,2)
per invoice

Request Example

{
"action": "UPLOAD",
"data": {
"content":

"ew0KCSJiMmIiOnsNCgkJImIyYmludm9pY2VzIjpbDQoJCQl7DQoJCQkJImdzdGluIjoiMDRBQUJGTjk4NzBDTVpU
IiwNCgkJCQkiZnAiOiIxMTIwMTYiLA0KCQkJCSJ2YWwiOjUwMDAsDQoJCQkJImlkdCI6IjA1LTAzLTIwMTciLA0KC
QkJCSJpbnVtIjoiNTU4OSIsDQoJCQkJInN1cHBfZ3N0aW4iOiI1N0FCQ0RFNzk2MEYxWjYiLA0KCQkJCSJuaWx0e
XBlIjoiTkciLA0KCQkJCSJwb3MiOiIwNCIsDQoJCQkJInJjaHJnIjoiTiIsDQoJCQkJIm9yZ2ludiI6IjcwMDAiLA0KCQkJ
CSJvcmdkYXRlIjoiMDUtMDMtMjAxNyIsDQoJCQkJIml0ZW1zIjpbDQoJCQkJCXsNCgkJCQkJCSJoc25fc2MiOiJHM
TIzIiwNCgkJCQkJCSJudW0iOjEsDQoJCQkJCQkidHh2YWwiOjEwMDAsDQoJCQkJCQkidHkiOiJHIiwNCgkJCQkJC
SJpcnQiOjEwLA0KCQkJCQkJImlhbXQiOjEwMCwNCgkJCQkJCSJjcnQiOjEwLA0KCQkJCQkJImNhbXQiOjEwMCw
NCgkJCQkJCSJjc3J0IjoxMCwNCgkJCQkJCSJjc2FtdCI6MTAwDQoJCQkJCX0NCgkJCQldDQoJCQkNCgkJCX0NC
gkJXQ0KCX0NCg0KfQ=="
,
"type": "application/json"
}

CUSTOMER SAP Localization Hub, digital compliance service


38 2017 SAP SE or an SAP affiliate company. All rights reserved. digital compliance service REST APIs
Response

Content type: JSON

Response Parameters

Parameter Data Type Description Values

ackNo Alphanumeric Acknowledgement ID 7f0de1a0-19bd-49f9-


a327-16e404204bb0

Response Status and Error Codes

Code Reason

200 Successful upload

400 Bad request

500 General error occured

Response Example

{
"ackNo": "7f0de1a0-19bd-49f9-a327-16e404204bb0"
}
If there is an error in the request, the response will be:
{
"status": "BAD_REQUEST",
"message": "Bad Request",
"details": [
{
"code": "INVOICE-U-005",
"description": "Invalid mimeType application/jso."
}
]

SAP Localization Hub, digital compliance service CUSTOMER


digital compliance service REST APIs 2017 SAP SE or an SAP affiliate company. All rights reserved. 39
1.2.2 REST Method: Get Invoice Status

Gets the status of the invoice.

Request

URI: {GSTR1-EndPoint}/invoice?gstin=04AABFN9870CMZT&fp=112016&invnum=5590

HTTP Method: GET

Permissions: dcs.sourceAdmin role is required

URI Parameters

Parameter Required Data Type Description Example

gstin Yes Alphanumeric Supplier GSTIN 06ADECO9084R5Z


4

Fp Yes Numeric Financial Period 112016

Invnum Yes Alphanumeric Invoice Number S00401


(max 50
characters)

supp_gstin Yes Alphanumeric Supplier GSTIN 06ADECO9084R5Z5

Response

Content type: JSON

Response Parameters

Parameter Data Type Description Example

gstin Alphanumeric Supplier GSTIN 06ADECO9084R5Z4

invnum Alphanumeric Invoice Number S00401

status Alphabetic Invoice Communication SENT


Status

Response Example
{
"gstin": "04AABFN9870CMZT",
"invnum": "5590",

CUSTOMER SAP Localization Hub, digital compliance service


40 2017 SAP SE or an SAP affiliate company. All rights reserved. digital compliance service REST APIs
"status": "SENT"
}

1.2.3 REST Method: Cancel Invoice

Cancels an invoice.

Request

URI: {GSTR2-EndPoint}/invoice?gstin=04AABFN9870CMZT&fp=112016&invnum=5590

HTTP Method: DELETE

Permissions: dcs.sourceAdmin role is required

Header Parameters

Parameter Required Data Type Description Example

tns_id Yes Alphanumeric Transaction ID

URI Parameters

Parameter Required Data Type Description Example

gstin Yes Alphanumeric Customer GSTIN 06ADECO9084R5Z


4

fp Yes Numeric Financial Period 112016

invnum Yes Alphanumeric Invoice Number S00401

supp_gstin Yes Alphanumeric Supplier GSTIN 06ADECO9084R5Z5

Response

Content type: JSON

Response Parameters

Parameter Data Type Description Example

gstin Alphanumeric Supplier GSTIN 06ADECO9084R5Z4

SAP Localization Hub, digital compliance service CUSTOMER


digital compliance service REST APIs 2017 SAP SE or an SAP affiliate company. All rights reserved. 41
Parameter Data Type Description Example

invnum Alphanumeric Invoice Number S00401

ackNo Alphanumeric Acknowledgement of d7723e62-73ce-49b7-


Cancel request befb-9663472ccc79

status Alphabetic Request Status Success/Failed

Response Example
{
"status": "Success",
"message": {
"code": "INVOICE-C-005",
"description": "Canceled successfully."
},
"ackNo": "fcb62da7-f4cf-403f-8af6-608e1809a9a1"
}

1.2.4 REST Method: Modify Invoice

Modifies an invoice.

Request

URI: {GSTR2-EndPoint}/invoice

HTTP Method: PUT

Permissions: dcs.sourceAdmin role is required

Header Parameters

Parameter Required Data Type Description Example

tns_id Yes Alphanumeric Transaction ID 68d43e5b-0ffa-


4a14-bf6a-
ad74ec160e2c

invoice_type Yes Alphanumeric Invoice type b2b

CUSTOMER SAP Localization Hub, digital compliance service


42 2017 SAP SE or an SAP affiliate company. All rights reserved. digital compliance service REST APIs
Request Payload Details

Parameter Description Reference

b2b b2b invoice payload invoice_type=b2b

imp_g imp_g invoice payload invoice_type=imp_g

imp_s imp_s invoice payload invoice_type=imp_s

cdn cdn invoice payload invoice_type=cdn

txi txi invoice payload invoice_type=txi

txpd txpd invoice payload invoice_type=txpd

For more information, see Base 64 encoded Payload Data in Upload Invoice.

Request Example
{"gstin":"04AABFN9870CMZT","fp":"122016", "supp_gstin":"57ABCDE7960F1Z6","ctin":
"57ABCDE7960F1Z6","val": 5000, "idt": "05-04-2017", "inum": "5590", "niltype": "NG", "items": [ { "hsn_sc":
"string", "iamt": 100, "irt": 10, "num": 1, "txval": 100, "ty": "S" } ] }

Response

Content type: JSON

Response Parameters

Parameter Required Data Type Description Example

status Status of Alphabatic Status Success/Failed


Acknowledgement

error Errror details of


validation

Error Details

Parameter Description

List{b2berror} B2B invoices error details

List{imp_gerror} Import of goods invoices error details

List{imp_serror} Import of Services invoices error details

List{cdnerror} Import of Credit/Debit invoices error details

List{txierror} Tax liability under reverse charge invoices error


details

SAP Localization Hub, digital compliance service CUSTOMER


digital compliance service REST APIs 2017 SAP SE or an SAP affiliate company. All rights reserved. 43
Parameter Description

List{txpderror} Tax Paid under reverse charge invoices error details

B2B Invoice error details

Parameter Data Type Description Example

gstin Supplier GSTIN Alphanumeric 06ADECO9084R5Z4


(15 characters)

fp Financial Period Numeric (6 digit) 112016

invnum Invoice number Alphanumeric S00401


(max 50 characters)

Import Goods error details

Parameter Data Type Description Example

gstin Supplier GSTIN Alphanumeric 06ADECO9084R5Z4


(15 characters)

fp Financial Period Numeric (6 digit) 112016

boe_num Billing number Alphanumeric S00401


(max 50 characters)

Import Services error details

Parameter Data Type Description Example

gstin Supplier GSTIN Alphanumeric 06ADECO9084R5Z4


(15 characters)

fp Financial Period Numeric (6 digit) 112016

i_num Invoice number Alphanumeric S00401


(max 50 characters)

Credit and Debit Note error details

Parameter Data Type Description Example

gstin Supplier GSTIN Alphanumeric 06ADECO9084R5Z4


(15 characters)

fp Financial Period Numeric (6 digit) 112016

i_num Invoice number Alphanumeric S00401


(max 50 characters)

CUSTOMER SAP Localization Hub, digital compliance service


44 2017 SAP SE or an SAP affiliate company. All rights reserved. digital compliance service REST APIs
Tax Liability Invoice error details

Parameter Data Type Description Example

gstin Supplier GSTIN Alphanumeric 06ADECO9084R5Z4


(15 characters)

fp Financial Period Numeric (6 digit) 112016

dnum Document number Alphanumeric S00401


(max 50 characters)

Tax Paid Invoice error details

Parameter Data Type Description Example

gstin Supplier GSTIN Alphanumeric 06ADECO9084R5Z4


(15 characters)

fp Financial Period Numeric (6 digit) 112016

invnum Invoice number Alphanumeric S00401


(max 50 characters)

Error Details

Parameter Data Type Description Example

errorcode code of the error Aphanumeric VAL_SUMMARY_FP

errormsg Description of the error Aphanumeric Invalid FP: The financial


period is not opened for
Invoice Save.

Response Example

Success Response
{
"status": "Success",
"ackNo": "f92fc5f6-f2a3-47c2-8281-d23febd3476e"
}

Validation Response
{
"status": "Failed",
"error": {
"b2berror": [

SAP Localization Hub, digital compliance service CUSTOMER


digital compliance service REST APIs 2017 SAP SE or an SAP affiliate company. All rights reserved. 45
{
"gstin": "04AABFN9870CMZT",
"fp": "102016",
"invnum": "5590",
"errors": [
{
"errorcode": "VAL_SUMMARY_FP",
"errormsg": "Invalid FP: The financial period is not opened for Invoice Save."
}
]
}
],
"imp_gerror": [],
"imp_serror": [],
"cdnerror": [],
"txierror": [],
"txpderror": []
},
"ackNo": "192c6530-fcf3-4841-8626-1c399f810426"
}

1.2.5 REST Method: Get Acknowledgement ID Status

Gets the status of the acknowledgement ID.

Request

URI: {GSTR2-EndPoint}/invoices?ackNo=f92fc5f6-f2a3-47c2-8281-d23febd3476e

HTTP Method: GET

Permissions: dcs.sourceAdmin role is required

URI Parameters

Parameter Required Data Type Description Example

ackNo Yes Alphanumeric Acknowledgement f92fc5f6-f2a3-


Number 47c2-8281-
d23febd3476e

CUSTOMER SAP Localization Hub, digital compliance service


46 2017 SAP SE or an SAP affiliate company. All rights reserved. digital compliance service REST APIs
Response

Content type: JSON

Response Parameters

Parameter Data Type Description Example

status Alphabetic Status of UPLDD / PART_UPLOAD


acknowledgement / ERROR

Error Details
See Error Details in REST Method: Modify Invoice.

Response Example

Case Success
{
"status": "UPLOAD"
}

Case Failure
{
"status": "ERROR",
"error": {
"b2berror": [
{
"gstin": "04AABFN9870CMZT",
"fp": "122016",
"invnum": "5590",
"errors": {
"errorcode": "VAL_SUMMARY_FP",
"errormsg": "Invalid FP: The financial period is not opened for Invoice Save."
}
}
],
"imp_gerror": [],
"imp_serror": [],
"cdnerror": [],
"txierror": [],
"txpderror": []
}
}

SAP Localization Hub, digital compliance service CUSTOMER


digital compliance service REST APIs 2017 SAP SE or an SAP affiliate company. All rights reserved. 47
www.sap.com/contactsap

2017 SAP SE or an SAP affiliate company. All rights reserved.


No part of this publication may be reproduced or transmitted in any
form or for any purpose without the express permission of SAP SE
or an SAP affiliate company.
SAP and other SAP products and services mentioned herein as well
as their respective logos are trademarks or registered trademarks of
SAP SE (or an SAP affiliate company) in Germany and other
countries. All other product and service names mentioned are the
trademarks of their respective companies. Please see http://www.
sap.com/corporate-en/legal/copyright/index.epx#trademark for
additional trademark information and notices.

Material Number:

You might also like