{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "GET:/shipping/shipment/failed/[shipmentId]", "type": "object", "properties": { "resourceParameters": { "type": "object", "properties": { "shipmentId": { "minimum": "1", "maximum": "99", "type": "integer" } } }, "urlParameters": { "type": "object", "properties": {} } } }
Нет, мне нужно понять что с примером запроса не так относительно этой схемы, насколько я понял. Есть еще вот что
Response Schema:
{
"$schema":"http://json-schema.org/draft-04/schema#",
"title":"GET:/shipping/shipment/failed/[shipmentId]",
"type":"object",
"properties":{
"error":{
"type" : ["array","null"],
"items": {
"type" : "object",
"errorCode":{
"enum" : ["1000","1001", "1004", "1006", "1007", "1018", "1026", "1027", "1028", "1029", "1030", "1031", "1032","1033", "1034", "1035", "1037"],
"type" : "string"
},
"errorType":{
"enum" : ["business rules", "object error", "validation error", "resource error", "application error", "rule error", "server side error", "business rule error"],
"errorMessage":{
"errorAction":{
"errorObj":{
}
"required": ["errorCode","errorType","errorMessage","errorAction","errorObj"]
"data":{
"type" : ["object", "null"],
"shipment":{
"collectionDate":{
"type" : ["string"], "format": "date"
},---------- Добавлено 12.01.2017 в 00:55 ----------
И к нему это
Example Response:
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 6002
"error":null,
"collectionDate":"2014-12-31",
"consignment":{
"auditInfo":{
"createdDate":"2014-10-30 13:00:00",
"ownerRecord":null,
"updatedDate":"2014-10-30 14:00:00"
"collectionDetails":{
"address":{
"countryCode":"GB",
"countryName":"United Kingdom",
"organisation":"GeoPostUK Ltd",
"postcode":"B66 1BY",
"street":"Roebuck Lane",
"locality":"Smethwick",
"town":"Birmingham",
"county":"West Midlands"
"contactDetails":{
"contactName":"Mr David Smith",
"telephone":"07927123456"
"consignmentNumber":"8512345678",
"consignmentRef":"8522345678",
"customsValue":5.99,
"deliveryDetails":{
"notificationDetails":{
"email":"david.smith@dpdgroup.co.uk",
"mobile":"07929123456"
"deliveryInstructions":"Please place parcel in the porch",
"liability":false,
"liabilityValue":11.00,
"networkCode":"1^12",
"numberOfParcels":1,
"parcel":[{ "auditInfo":{
"isVoided":false,
"labelNumber":"0B661BY159760000000008128269",
"packageNumber":1,
"parcelnetBarcode":"",
"parcelnetData":"",
"parcelnetLabelNumber":"",
"parcelNumber":"15501234567890",
"parcelProduct":[{ "numberOfItems":1,
"productCode":"PC:20435",
"productFabricContent":"",
"productHarmonisedCode":"",
"productItemsDescription":"",
"productTypeDescription":"",
"unitValue":10.00,
"unitWeight":5.0,
}]
}],
"parcelDescription":"Shoes",
"shippingRef1":"PurchaseOrder:12345",
"shippingRef2":"InvoiceNo:23451",
"shippingRef3":"OID:8709",
"totalWeight":5
"isPrinted":false,
"manifestId":873247,
"shipmentId":987324,
"shipmentType":0,
"userId":980324,
"failure_details":{
"originalFilename":"import.txt",
"row":0,
"lineData":01,shippingRef1,B69 4DA,
"failureReasons":[""],
"status":""
Задача найти эрроров побольше.А вот на что в первую очередь обратить внимание - вот это вопрос, уважаемые.