From 3c476e43e39dbfcf02c2f16d41ed3134fdf60a4b Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Sun, 5 May 2024 21:21:39 -0600 Subject: [PATCH] Add error response type --- Home.md | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/Home.md b/Home.md index 7136f49..322c417 100644 --- a/Home.md +++ b/Home.md @@ -22,16 +22,6 @@ All barcodes shall start with `QSv1` as the first field. The second field shall ## Data Fields -### Subtype `u`: URL providing the code content - -This type allows for smaller and shorter codes by providing a HTTP URL linking to where the barcode's content can be retrieved. The URL shall respond to a `GET` request by serving a Quick Send code with the mimetype `text/plain`. The data shall be served in the same format as it would be if encoded into a barcode directly. If a response is received that is not a valid Quick Send code, the application should handle it the same as scanning an incompatible barcode. - -Position | Meaning ----------|-------- -0 | Format header (`QSv1`) -1 | Subtype header (`u`) -2 | URL, starting with `http://` or `https://` - ### Subtype `a`: To/From Addresses Basic to/from address data only. @@ -119,6 +109,29 @@ Position | Meaning 43 | EEL/PFC: Use "NOEEI 30.37(a)" for most shipments under $2,500. Otherwise, use the shipment's Automated Export System (AES) Internal Transaction Number (ITN). 44 | Customs items. See appendix for format. + +### Subtype `u`: URL providing the code content + +This type allows for smaller and shorter codes by providing a HTTP URL linking to where the barcode's content can be retrieved. The URL shall respond to a `GET` request by serving a Quick Send code with the mimetype `text/plain`. The data shall be served in the same format as it would be if encoded into a barcode directly. The HTTP response code shall be `200`. If a response is received that is not a valid Quick Send code, the application should handle it the same as scanning an incompatible barcode. + +Position | Meaning +---------|-------- +0 | Format header (`QSv1`) +1 | Subtype header (`u`) +2 | URL, starting with `http://` or `https://` + + +### Subtype `e`: Error response to URL request + +This type allows for a server to respond with an error message if a code with type `u` is requested but the request cannot be fulfilled. + +Position | Meaning +---------|-------- +0 | Format header (`QSv1`) +1 | Subtype header (`e`) +2 | Error code or reference +3 | Human-readable error message + ## Appendix ### Item Types