API V2.0: Difference between revisions

Jump to navigation Jump to search
Line 84: Line 84:
Responses will be an array containing a number of response items equal to the number of items in the request.
Responses will be an array containing a number of response items equal to the number of items in the request.


Each response item will contain a "success" field, and may contain a "modified", "errors", "warnings" or "info" field (these are not mutually exclusive).
Each response item will contain a "success" boolean field. Success will be false if there were any errors in processing the item.
Note: Success being false does not necessarily mean that nothing has changed.
E.g. if a valid booking with an invalid info item is posted, the booking will be created but the info item will not. Success will be false in this case because there was an error.
 
A response item may also contain one or more of the following:
*New - contains information about newly created items and subitems. For example, the id of a newly created booking, or the id of a new info item for an existing booking.
*Modified - contains information about modified items and subitems. For example, if the departure date of a booking is changed, this field will have information confirming this change.
*Errors - Contains information about fatal issues with an item or subitem in the request. An error means that an attempt was made to create or change an item or subitem, but that attempt failed.
*Warnings - Contains information about non-fatal issues with an item in the request. A warning means that an item or subitem was created or changed, but, for example, a non-required field had invalid data provided.
*Info - Contains general information about what has happened to the request.
 
These provide additional


==== Order of response items ====
==== Order of response items ====