๐ Your API Credentials
Brand Slug
madina-fashion
API Key
phygit_mf_L3Fim1xTh0LXJ0ohTeyp6ytJFUIyyXHy
Base URL
https://phygit.itglobalonline.com/api/v1
Plan
Enterprise โ 10,000 calls/month ยท 500 certs/month
๐ก Keep your API key secret. If compromised, contact support@phygit.io for rotation.
5-Minute Quickstart
1Register a product โ get a UID + DPP URL
2Embed the badge snippet on your product page
3Issue blockchain certificate after product ships
4Register a webhook to get notified on events
๐ Authentication
All requests must include these headers:
Authorization: Bearer phygit_mf_L3Fim1xTh0LXJ0ohTeyp6ytJFUIyyXHy X-Phygit-Brand: madina-fashion Content-Type: application/json
Example with curl:
curl -X GET "https://phygit.itglobalonline.com/api/v1/brand" \ -H "Authorization: Bearer phygit_mf_L3Fim1xTh0LXJ0ohTeyp6ytJFUIyyXHy" \ -H "X-Phygit-Brand: madina-fashion"
๐ฆ Register a Product
POST
/api/v1/products
Create product + issue NFC UID + DPP URL
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| sku | string | required | Your internal product SKU |
| name | string | required | Product display name |
| category | string | required | e.g. shirt, saree, electronics |
| fabric_type | string | optional | e.g. cotton, polyester |
| price | number | required | Price in BDT (or local currency) |
| description | string | optional | Product description |
{
"sku": "MF-SHIRT-001",
"name": "Madina Premium Cotton Shirt",
"category": "shirt",
"fabric_type": "100% Cotton",
"price": 1200,
"description": "Premium quality cotton shirt for everyday wear."
}
Response
{
"success": true,
"data": {
"uid": "MF-ABCD1234",
"product_id": 1042,
"sku": "MF-SHIRT-001",
"name": "Madina Premium Cotton Shirt",
"dpp_url": "https://phygit.itglobalonline.com/dpp-certificate/MF-ABCD1234",
"certificate_url": "https://phygit.itglobalonline.com/dpp-certificate/MF-ABCD1234",
"scan_url": "https://phygit.itglobalonline.com/scan/MF-ABCD1234",
"embed_snippet": "<div class=\"phygit-badge\" data-uid=\"MF-ABCD1234\"></div>",
"carbon_rating": "B",
"carbon_kg": 3.8
},
"meta": { "api_version": "1.0", "brand_slug": "madina-fashion", "timestamp": "..." }
}
๐ Get DPP Certificate
GET
/api/v1/products/{uid}
Full EU Digital Product Passport data
GET /api/v1/products/MF-ABCD1234
Response
{
"success": true,
"data": {
"uid": "MF-ABCD1234",
"product": { "id": 1042, "title": "...", "sku": "...", "price": 1200, ... },
"dpp_url": "https://phygit.itglobalonline.com/dpp-certificate/MF-ABCD1234",
"blockchain": { "verified": false, "tx_hash": null, "network": "polygon" },
"carbon_footprint_kg": 3.8,
"certifications": [],
"fiber_composition": "100% Cotton",
"care_instructions": "...",
"country_of_manufacture": "BD"
}
}
โ๏ธ Issue Blockchain Certificate
POST
/api/v1/certs/issue
Mint NFT on Polygon โ immutable product record
โ ๏ธ Requires blockchain gas. Uses Phygit's shared wallet โ included in enterprise plan.
{
"uid": "MF-ABCD1234"
}
Response
{
"success": true,
"data": {
"uid": "MF-ABCD1234",
"tx_hash": "0xabc...def",
"polygon_url": "https://polygonscan.com/tx/0xabc...def",
"certificate_pdf_url": "https://phygit.itglobalonline.com/dpp-certificate/MF-ABCD1234",
"status": "minted"
}
}
๐ฟ Carbon + Warranty Data
GET
/api/v1/products/{uid}/enrichment
Carbon rating, footprint, warranty terms
GET /api/v1/products/MF-ABCD1234/enrichment
Response
{
"success": true,
"data": {
"uid": "MF-ABCD1234",
"carbon_kg": 3.8,
"carbon_rating": "B",
"warranty_months": 6,
"warranty_type": "stitching",
"warranty_terms_en": "Madina Fashion guarantees stitching quality. Any defects repaired free of charge.",
"dpp_url": "https://phygit.itglobalonline.com/dpp-certificate/MF-ABCD1234"
}
}
Carbon rating scale: A โค2kg ยท B โค5kg ยท C โค10kg ยท D >10kg COโe
๐ Embed Badge on Your Store
Paste once in your site's <head>:
<script src="https://phygit.itglobalonline.com/embed/badge.js"></script>
Then add this div wherever you want the badge to appear on a product page:
<div class="phygit-badge" data-uid="MF-ABCD1234"></div>
๐ Webhooks
Get notified when products are certified or orders are verified.
POST
/api/v1/webhook/register
Subscribe to Phygit events
{
"url": "https://modinafashion.com/webhooks/phygit",
"events": ["product.certified", "order.verified"]
}
Available events: product.certified ยท order.verified ยท scan.detected ยท cert.issued
Response
{
"success": true,
"data": {
"webhook_id": 1,
"url": "https://modinafashion.com/webhooks/phygit",
"events": ["product.certified", "order.verified"],
"signing_secret": "whsec_xxxxxxxxxxxxxxxx",
"note": "Verify webhook signatures with X-Phygit-Signature header (HMAC-SHA256)."
}
}
Payload sent to your URL
{
"event": "product.certified",
"uid": "MF-ABCD1234",
"tx_hash": "0xabc...def",
"certificate_url": "https://phygit.itglobalonline.com/dpp-certificate/MF-ABCD1234",
"timestamp": "2026-06-13T10:00:00Z"
}
๐ Usage & Metering
GET
/api/v1/usage
Current month API usage summary
{
"success": true,
"data": {
"period": "2026-06",
"calls_this_month": 142,
"plan_api_limit": 10000,
"usage_pct": 1.4,
"certs_issued": 18,
"carbon_ratings": 57,
"monthly_plan": "enterprise",
"estimated_cost_usd": 199.00,
"endpoint_breakdown": [
{ "endpoint": "api/v1/products", "calls": 80 },
{ "endpoint": "api/v1/certs/issue", "calls": 18 }
]
}
}
Also available via response headers on every request:
X-Plan-API-Used: 142 X-Plan-API-Limit: 10000 X-RateLimit-Remaining: 858
Full dashboard: Enterprise Usage Dashboard โ
โ Error Codes
| HTTP | Code | Meaning |
|---|---|---|
| 401 | MISSING_KEY | No Authorization header sent |
| 401 | INVALID_KEY | API key not found or wrong |
| 403 | BRAND_INACTIVE | Brand account suspended |
| 404 | NOT_FOUND | UID or resource not found |
| 422 | VALIDATION_ERROR | Missing or invalid request fields |
| 429 | RATE_LIMIT | Exceeded hourly rate limit (1000 req/hr on enterprise) |
| 429 | MONTHLY_LIMIT_REACHED | Monthly API call quota exhausted |
| 500 | SERVER_ERROR | Phygit internal error โ contact support |