HTTP REQUEST
Note: The endpoint can be called by either a GET or POST request.
The following parameters are passed as a json string as part of the authentication request:
| Field | Description | Example |
|---|---|---|
| CollectionNo | a unique value to distinguish collection. | TEST0004 |
| Date | Date in the format: YYYY/MM/DD | 2021/01/13 |
| FromClientName | name of client from whom collection is originating. | Huli Corp |
| FromAccountNo | account number from which collection is originating. | WIN001 |
| FromTown | town or area from which collection is originating. | JOHANNESBURG |
| ToAccountNo | account number to which collection is being sent to. | TEST002 |
| ToClientName | name of client to whom collection is being sent to. | Pied Piper |
| ToTown | town or area to which collection is being sent to. | JOHANNESBURG |
| ServiceCode | e.g ONX (overnight courier), NDX (normal air)... | ECO |
| TotalWeight | a numeric value indicating the sum total weight of all items in collection. | 12 |
| Pieces | a numeric value indicating the number of individual items in the collection. | 1 |
| Comments | a comment to be noted | Hold at depot |
| CollectionStatus | indicates whether the collection is complete or pending | delivered |
| Branch | the branch from which collection is being made | JNB |
| API_User | User or developer company passing the data. | shoprite integration |
| Driver | Name of driver | James |
| FromAddress1 | Building name and unit number of sender. | UNIT 51 AVANTE GARDE AVE |
| FromAddress2 | Street name of sender. | NORTHLANDS DECO PARK |
| FromAddress3 | Name of suburb or industrial area. | JOHANNESBURG |
| FromTownCode | Town code of sender. | JNB |
| FromContact | Name of sender | Sipho |
| FromTel | Phone number of sender | 011 453 1223 |
| ToAddress1 | Building name and unit number of receiver. | 62 SPYKER CRESCENT |
| ToAddress2 | Street name of receiver. | STORMILL |
| ToAddress3 | Name of suburb or industrial area of receiver. | JOHANNESBURG |
| ToTownCode | Town code of receiver | JNB |
| ToContact | Name of receiver. | Jonathan |
| ToTel | Phone number of receiver. | 083 312 3625 |
| Reference | A text reference for the collection | 240256 |
| SpecialInstructions | Instructions specific to collection. | Handle with care, fragile. |
| GroupName | Group name specifies databse to which post must be saved. Use group name assigned to you by winfreight. | wintest |
HTTP RESPONSE
The possible responses from calling this endpoint are as follows:
| Response | Description |
|---|---|
| Success | returns a json ResultSet including the SuccessMessage: OK - Collection No - has been created successfully! |
| Failure | this is a data error, it returns a json ResultSet including the appropriate ErrorMessage such as Collection No, already exists or missing parameters, or wrong format |
| Error | this is a server error, an appropriate ErrorMessage is returned from the server |