400 Bad Request - IBM/IFT-Developer-Zone GitHub Wiki

Error Description

The Connector API rejects the XML submission and returns a 400 Bad Request response.

Instructions to fix

This is an indication that something needs to be corrected in the XML. Once corrected, the XML can be resubmitted to Connector. The returned error message provides a description about what needs to be corrected with the XML. Below are some common error messages:


Issue

{
  "message": "EPCISBody.eventList.extensions[0].transformationEvents[0].inputEPCList.epc[0].<list element> Type must match one of the following patterns: [EPC_SSCC, EPC_SGTIN, FTLPN, SSCC_LA, SFTPI].  Visit this url to look up the pattern error codes. https://github.com/IBM/IFT-Developer-Zone/wiki/api-Error-Codes\n"
}

Resolution: One or more identifiers in the submitted XML do not conform to the expected format. In the example above the expected format codes are EPC_SSCC, EPC_SGTIN, FTLPN, SSCC_LA, SFTPI. These API Error Codes are described here.


Issue { "message": "The processing instruction target matching \"[xX][mM][lL]\" is not allowed." }

Resolution: User needs to double check that there is no whitespace before the <?xml> tag.


Issue { "message": "Content is not allowed in prolog." }

Resolution: User needs to remove all data before the opening <?xml> tag.


Issue {"message": "Root xml is not supported."}

Resolution: The connector component is hardcoded to look for one of the following root xml tags and namespaces:

  • Purchase Order: order:orderMessage
  • Despatch Advice: despatch_advice:despatchAdviceMessage
  • Receive Advice: *receiving_advice:receivingAdviceMessage
  • Master Data Item: item_data_notification:itemDataNotificationMessage
  • Master Data Facility: basic_party_registration:basicPartyRegistrationMessage
  • EPCIS Event: epcis:EPCISDocument

Issue {"message": "The string \"--\" is not permitted within comments."}

Resolution: Make sure all comments in the xml file are correctly formed , and do not contain any extra dash characters (–).


Issue { "message": "ERROR: cvc-complex-type.2.4.a: Invalid content was found starting with element 'action'. One of '{childEPCs}' is expected." }

Resolution: The tag must be present in the xml. It can contain no elements, but it must be present.


Issue { "message": ": childEPCs and childQuantityList cannot both be empty." }

Resolution: Make sure epcList or quantityList is present in the xml and is a correctly formed urn.


Issue {"message": "ERROR:cvc-datatype-valid.1.2.1:'2006-01-10T12:00:01.000-05:00' is not a valid value for 'date'.}

Resolution: Make sure data in a element only contains date information and not time information. For example, the orderLogisticalInformation->orderLogisticalDateInformation->requestedDeliveryDateTime->date field in a Purchase Order must be date only.


If none of these responses apply to your situation and you need assistance debugging your XML, please contact support.

⚠️ **GitHub.com Fallback** ⚠️