Add error response type
parent
29d5f553bb
commit
3c476e43e3
33
Home.md
33
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user