Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hello.
I am trying to update custom data on an Order through the GraphQL API. The purpose is for our fulfillment service to supply the picked serial numbers on an order.
I have set up a JSON Schema that looks like this:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"items": [
{
"type": "object",
"properties": {
"parcelNumber": {
"type": "string"
},
"packingTime": {
"type": "string",
"format": "date-time"
},
"lineItems": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"lineItemId": {
"type": "string"
},
"itemNumber": {
"type": "string"
},
"serialNumber": {
"type": "string"
}
},
"required": [
"lineItemId",
"itemNumber",
"serialNumber"
]
}
]
}
},
"required": [
"parcelNumber",
"packingTime",
"lineItems"
]
}
]
}
And I am sending data that looks like this:
[
{
"parcelNumber": "n/a",
"packingTime": "2024-11-19T15:47:17.1562611",
"lineItems": [
{
"lineItemId": "33882713292959",
"itemNumber": "LEGO-S4561",
"serialNumber": "8888"
}
]
}
]
My problem is that the date-time format is failing validation. However, the data I am sending should pass the date-time format validation.
If look here:
JSON Schema - string
RFC 3339 - Date and Time on the Internet: Timestamps
There should be support for the format I am supplying.
I have validated it using NewtonSoft, which should tell you that the format is right. Check it out here: JSON Schema Validator - Newtonsoft
So my concern is that you are not correctly validating the date-time format in the JSON Schema.
Thanks
Søren
As 2024 wraps up, the dropshipping landscape is already shifting towards 2025's trends....
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024In today’s interview, we sat down with @BSS-Commerce to discuss practical strategies f...
By JasonH Nov 13, 2024