Retrieve order invoice
curl --request GET \
--url https://staging.api.commercengine.io/api/v1/{store_id}/storefront/pos/orders/{order_number}/invoice \
--header 'Authorization: Bearer <token>'import requests
url = "https://staging.api.commercengine.io/api/v1/{store_id}/storefront/pos/orders/{order_number}/invoice"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://staging.api.commercengine.io/api/v1/{store_id}/storefront/pos/orders/{order_number}/invoice', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.api.commercengine.io/api/v1/{store_id}/storefront/pos/orders/{order_number}/invoice",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://staging.api.commercengine.io/api/v1/{store_id}/storefront/pos/orders/{order_number}/invoice"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://staging.api.commercengine.io/api/v1/{store_id}/storefront/pos/orders/{order_number}/invoice")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.commercengine.io/api/v1/{store_id}/storefront/pos/orders/{order_number}/invoice")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "<string>",
"success": true,
"content": {
"invoices": [
{
"invoice_number": "<string>",
"status": "<string>",
"invoice_date": "2023-12-25",
"irn_number": "<string>",
"ack_number": "<string>",
"ack_date": "2023-11-07T05:31:56Z",
"signed_qr_code": "<string>",
"gatepass_barcode": "<string>",
"seller_details": {
"id": "<string>",
"name": "<string>",
"trade_name": "<string>",
"legal_name": "<string>",
"business_type": "sole_proprietorship",
"tax_identification_number": "<string>",
"status": "pending_approval",
"kyc_status": "document_pending",
"visibility": "public",
"logo": "<string>"
},
"billing_address": {
"first_name": "<string>",
"phone": "<string>",
"email": "<string>",
"address_line1": "<string>",
"pincode": "<string>",
"city": "<string>",
"state": "<string>",
"country": "India",
"id": "<string>",
"last_name": "<string>",
"country_code": "<string>",
"address_line2": "<string>",
"landmark": "<string>",
"gstin": "<string>",
"business_name": "<string>",
"is_phone_verified": true,
"is_email_verified": true,
"is_default_shipping": true,
"is_default_billing": true,
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z"
},
"shipping_address": {
"first_name": "<string>",
"phone": "<string>",
"email": "<string>",
"address_line1": "<string>",
"pincode": "<string>",
"city": "<string>",
"state": "<string>",
"country": "India",
"id": "<string>",
"last_name": "<string>",
"country_code": "<string>",
"address_line2": "<string>",
"landmark": "<string>",
"gstin": "<string>",
"business_name": "<string>",
"is_phone_verified": true,
"is_email_verified": true,
"is_default_shipping": true,
"is_default_billing": true,
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z"
},
"subtotal": 123,
"sub_total": 123,
"sub_total_including_tax": 123,
"shipping_amount": 123,
"shipping_amount_including_tax": 123,
"coupon_code": "<string>",
"coupon_discount_percent": 123,
"coupon_discount_amount": 123,
"promotion_discount_amount": 123,
"loyalty_point_redeemed": 123,
"total_tax": 123,
"grand_total": 123,
"tax_summary": [
{
"tax_rate": 123,
"taxable_value": 123,
"igst": 123,
"cgst": 123,
"sgst": 123
}
],
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z",
"items": [
{
"sku": "<string>",
"product_name": "<string>",
"product_image_url": "<string>",
"listing_price": 123,
"selling_price": 123,
"qty": "<string>",
"free_qty": "<string>",
"tax_type": "<string>",
"tax_rate": 123,
"hsncode": "<string>",
"batch_number": "<string>",
"expiry": "<string>",
"amount": 123,
"coupon_discount_amount": 123,
"promotion_discount_amount": 123,
"selling_price_excluding_tax": 123
}
]
}
]
}
}Orders
Retrieve order invoice
Retrieve order invoice
GET
/
pos
/
orders
/
{order_number}
/
invoice
Retrieve order invoice
curl --request GET \
--url https://staging.api.commercengine.io/api/v1/{store_id}/storefront/pos/orders/{order_number}/invoice \
--header 'Authorization: Bearer <token>'import requests
url = "https://staging.api.commercengine.io/api/v1/{store_id}/storefront/pos/orders/{order_number}/invoice"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://staging.api.commercengine.io/api/v1/{store_id}/storefront/pos/orders/{order_number}/invoice', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.api.commercengine.io/api/v1/{store_id}/storefront/pos/orders/{order_number}/invoice",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://staging.api.commercengine.io/api/v1/{store_id}/storefront/pos/orders/{order_number}/invoice"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://staging.api.commercengine.io/api/v1/{store_id}/storefront/pos/orders/{order_number}/invoice")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.commercengine.io/api/v1/{store_id}/storefront/pos/orders/{order_number}/invoice")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "<string>",
"success": true,
"content": {
"invoices": [
{
"invoice_number": "<string>",
"status": "<string>",
"invoice_date": "2023-12-25",
"irn_number": "<string>",
"ack_number": "<string>",
"ack_date": "2023-11-07T05:31:56Z",
"signed_qr_code": "<string>",
"gatepass_barcode": "<string>",
"seller_details": {
"id": "<string>",
"name": "<string>",
"trade_name": "<string>",
"legal_name": "<string>",
"business_type": "sole_proprietorship",
"tax_identification_number": "<string>",
"status": "pending_approval",
"kyc_status": "document_pending",
"visibility": "public",
"logo": "<string>"
},
"billing_address": {
"first_name": "<string>",
"phone": "<string>",
"email": "<string>",
"address_line1": "<string>",
"pincode": "<string>",
"city": "<string>",
"state": "<string>",
"country": "India",
"id": "<string>",
"last_name": "<string>",
"country_code": "<string>",
"address_line2": "<string>",
"landmark": "<string>",
"gstin": "<string>",
"business_name": "<string>",
"is_phone_verified": true,
"is_email_verified": true,
"is_default_shipping": true,
"is_default_billing": true,
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z"
},
"shipping_address": {
"first_name": "<string>",
"phone": "<string>",
"email": "<string>",
"address_line1": "<string>",
"pincode": "<string>",
"city": "<string>",
"state": "<string>",
"country": "India",
"id": "<string>",
"last_name": "<string>",
"country_code": "<string>",
"address_line2": "<string>",
"landmark": "<string>",
"gstin": "<string>",
"business_name": "<string>",
"is_phone_verified": true,
"is_email_verified": true,
"is_default_shipping": true,
"is_default_billing": true,
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z"
},
"subtotal": 123,
"sub_total": 123,
"sub_total_including_tax": 123,
"shipping_amount": 123,
"shipping_amount_including_tax": 123,
"coupon_code": "<string>",
"coupon_discount_percent": 123,
"coupon_discount_amount": 123,
"promotion_discount_amount": 123,
"loyalty_point_redeemed": 123,
"total_tax": 123,
"grand_total": 123,
"tax_summary": [
{
"tax_rate": 123,
"taxable_value": 123,
"igst": 123,
"cgst": 123,
"sgst": 123
}
],
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z",
"items": [
{
"sku": "<string>",
"product_name": "<string>",
"product_image_url": "<string>",
"listing_price": 123,
"selling_price": 123,
"qty": "<string>",
"free_qty": "<string>",
"tax_type": "<string>",
"tax_rate": 123,
"hsncode": "<string>",
"batch_number": "<string>",
"expiry": "<string>",
"amount": 123,
"coupon_discount_amount": 123,
"promotion_discount_amount": 123,
"selling_price_excluding_tax": 123
}
]
}
]
}
}Was this page helpful?
โI