Skip to content

Instantly share code, notes, and snippets.

@sadhasivam
Last active February 9, 2023 02:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sadhasivam/9778d7d7ac9c4b57e3e0f26a9f502b8a to your computer and use it in GitHub Desktop.
Save sadhasivam/9778d7d7ac9c4b57e3e0f26a9f502b8a to your computer and use it in GitHub Desktop.
sample-schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://dataworks.fedex.io/orderfulfillment.schema.json",
"title": "OrderFulfillment",
"description": "Order fulfillment schema",
"type": "object",
"properties": {
"orderNumber": {
"description": "a unique reference number assigned by a Merchant to a Buyer for a finance transaction. ",
"type": "alphanumeric",
"maxLength": 120
},
"orderSource": {
"description": "An Order Source identifies where an order originated from",
"type": "string",
"enum": [
"WEB",
"MOBILE",
"STORE",
"AFFILIATE",
"CHANNEL-PARTNER",
"NULL"
],
"maxLength": 50
},
"fulfillmentStatus": {
"description": "If your order is “in fulfillment” that most likely means that it's been processed and is currently being prepared for shipment. Once fulfillment is completed, an order has been delivered to the customer and the process is complete.",
"type": "string",
"enum": [
"PLACED",
"INCOMPLETE",
"SHIPPED",
"PARTIALLY SHIPPED",
"REFUNDED",
"CANCELLED",
"PARTIALLY REFUNDED",
"UNKNOWN"
],
"maxLength": 50
},
"promiseDeliveryDate": {
"description": "Promised Delivery Date means the actual delivery date promised by Seller for Goods ordered hereunder that is set forth in Schedule 1 or in a Purchase Order, in which case the promised delivery date must be a Business Day no more than the applicable lead time for the Goods. e.g) YYYY-MM-ddThh:mm:SSZ\t",
"type": "string",
"format": "utc.datetime"
},
"createdAt": {
"description": "When the order placed. datetime.utc e.g)2024-11-21T10:00:00Z",
"type": "string",
"format": "utc.datetime"
},
"updatedAt": {
"description": "When the order is last modfied. datetime.utc e.g)2024-11-21T10:00:00Z",
"type": "string",
"format": "utc.datetime"
},
"orderType": {
"type": "string"
},
"subtotal": {
"type": "integer"
},
"tax": {
"type": "integer"
},
"total": {
"type": "integer"
},
"weight": {
"type": "number"
},
"weightUnit": {
"type": "string"
},
"billing": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"tenderType": {
"type": "string"
},
"currencyCode": {
"type": "string"
},
"address": {
"type": "object",
"properties": {
"city": {
"type": "string"
},
"zip": {
"type": "string"
},
"state": {
"type": "string"
},
"countryCode": {
"type": "string"
}
},
"required": [
"city",
"zip",
"state",
"countryCode"
]
}
},
"required": [
"tenderType",
"currencyCode",
"address"
]
}
]
},
"shipping": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"type": {
"type": "string"
},
"address": {
"type": "object",
"properties": {
"city": {
"type": "string"
},
"zip": {
"type": "string"
},
"state": {
"type": "string"
},
"countryCode": {
"type": "string"
}
},
"required": [
"city",
"zip",
"state",
"countryCode"
]
}
},
"required": [
"type",
"address"
]
}
]
},
"buyer": {
"type": "object",
"properties": {
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"email": {
"type": "string"
},
"email_hash": {
"type": "string"
},
"phone": {
"type": "string"
}
},
"required": [
"firstName",
"lastName",
"email",
"email_hash",
"phone"
]
},
"items": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"sku": {
"type": "string"
},
"variantId": {
"type": "string"
},
"variantTitle": {
"type": "string"
},
"title": {
"type": "string"
},
"productUrl": {
"type": "string"
},
"imageUrl": {
"type": "string"
},
"quantity": {
"type": "integer"
},
"dimension": {
"type": "object",
"properties": {
"length": {
"type": "integer"
},
"width": {
"type": "integer"
},
"Height": {
"type": "integer"
}
},
"required": [
"length",
"width",
"Height"
]
},
"unitPrice": {
"type": "integer"
},
"status": {
"type": "string"
},
"taxable": {
"type": "boolean"
},
"weight": {
"type": "number"
},
"returnInDays": {
"type": "integer"
}
},
"required": [
"id",
"sku",
"variantId",
"variantTitle",
"title",
"productUrl",
"imageUrl",
"quantity",
"dimension",
"unitPrice",
"status",
"taxable",
"weight",
"returnInDays"
]
}
]
},
"charges": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"type": {
"type": "string"
},
"amount": {
"type": "integer"
},
"description": {
"type": "string"
}
},
"required": [
"type",
"amount",
"description"
]
}
]
},
"discounts": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"type": {
"type": "string"
},
"amount": {
"type": "integer"
},
"description": {
"type": "string"
}
},
"required": [
"type",
"amount",
"description"
]
}
]
},
"updateReason": {
"type": "string"
},
"merchant": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"token": {
"type": "string"
}
},
"required": [
"id",
"name",
"token"
]
},
"fulfillments": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"shipDate": {
"type": "string"
},
"carrierCode": {
"type": "string"
},
"serviceType": {
"type": "string"
},
"type": {
"type": "string"
},
"trackingNumber": {
"type": "string"
},
"weight": {
"type": "number"
},
"weight_unit": {
"type": "string"
},
"items": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"id": {
"type": "object",
"properties": {
"value": {
"type": "string"
}
},
"required": [
"value"
]
},
"quantity": {
"type": "object",
"properties": {
"value": {
"type": "integer"
}
},
"required": [
"value"
]
}
},
"required": [
"id",
"quantity"
]
}
]
}
},
"required": [
"shipDate",
"carrierCode",
"serviceType",
"type",
"trackingNumber",
"weight",
"weight_unit",
"items"
]
}
]
}
},
"required": [
"orderNumber",
"orderSource",
"fulfillmentStatus",
"promiseDeliveryDate",
"createdAt",
"updatedAt",
"orderType",
"subtotal",
"tax",
"total",
"weight",
"weightUnit",
"billing",
"shipping",
"buyer",
"items",
"charges",
"discounts",
"updateReason",
"merchant",
"fulfillments"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment