Phygit API Documentation Enterprise

Integration guide for Madina Fashion ยท modinafashion.com

๐Ÿš€ 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

FieldTypeRequiredDescription
skustringrequiredYour internal product SKU
namestringrequiredProduct display name
categorystringrequirede.g. shirt, saree, electronics
fabric_typestringoptionale.g. cotton, polyester
pricenumberrequiredPrice in BDT (or local currency)
descriptionstringoptionalProduct 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>

Preview โ€” badge renders like this:

B
Carbon Rating ๐ŸŒฟ Good ยท 3.8 kg COโ‚‚ โฌก PHYGIT CERTIFIED ยท View Certificate โ†—

๐Ÿ”” 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

HTTPCodeMeaning
401MISSING_KEYNo Authorization header sent
401INVALID_KEYAPI key not found or wrong
403BRAND_INACTIVEBrand account suspended
404NOT_FOUNDUID or resource not found
422VALIDATION_ERRORMissing or invalid request fields
429RATE_LIMITExceeded hourly rate limit (1000 req/hr on enterprise)
429MONTHLY_LIMIT_REACHEDMonthly API call quota exhausted
500SERVER_ERRORPhygit internal error โ€” contact support