Adding a New Pickup Point to an Existing Directory
This method is used to add a new pickup point of any valid type to the PP directory created in the Gold Apple IS. Reasons for adding a point may include the opening of a new location, the connection of courier-service partner locations, and any other events related to the provision of new pickup points.
Basic Information
| Request method type | POST |
|---|---|
| Path / URL | /api/v1/pickpoints/add |
| Description | Method for adding one PP to the directory stored in the Gold Apple IS. One request — one PP added. |
| Direction | The request is executed by the courier service. The response is provided by the Gold Apple IS. |
Request
Header Parameters
| Parameter | Data type | Required | Description | Comment |
|---|---|---|---|---|
| Authorization | string | 1 | Access token issued by the service | see the Authorization in the Service method |
| content-type | string | 1 | Request content type | Filled in as "application/json" |
Request Parameters
| № | Parameter | Data type | Required | Description | Comment | ||
|---|---|---|---|---|---|---|---|
| 1 | countryISOCode | string (2) | 1 | Courier service country code | Per the "ISO 3166-1, alpha-2" standard | ||
| 2 | deliveryServiceCode | string (100) | 1 | Courier service code | Agreed upon during system integration | ||
| 3 | id | string (100) | 1 | Courier service PP identifier | Passed by the courier service | ||
| 4 | type | string (20) | 1 | Pick-up point type | See "Format Tables" → "Table 1" | ||
| 5 | address | object | 1 | Object containing address data | |||
| 6 | Address object type | object | 1 | Object containing address information. | Address object (see Appendix: Address Data Types) | ||
| 7 | openingHours | array of objects | 1 | Array of PP working-hours objects | |||
| 8 | dayOfWeek | enum | 1 | Identifier of the day for which the working schedule is set | See "Format Tables" → "Table 3" | ||
| 9 | workingDay | bool | 1 | Working-day flag | If on, the PP operates on this day of the week | ||
| 10 | opens | string (15) | 0 | PP opening time | Per the "ISO 8601" standard (hh:mm:ss) | ||
| 11 | closes | string (15) | 0 | PP closing time | Per the "ISO 8601" standard (hh:mm:ss) | ||
| 12 | phoneNumber | string (20) | 0 | PP phone number | No special characters, digits only (country code and area code) | ||
| 13 | isAvailable | boolean | 1 | PP availability status | If the flag is on, the PP is active; if off, it is not | ||
| 14 | orderStoragePeriod | int | 1 | Order storage period, in calendar days | Example: 5 | ||
| 15 | options | object | 1 | Object with options available at the PP | |||
| 16 | orderIssuing | bool | 1 | Order issuing available | If on, the PP can hand out orders | ||
| 17 | orderReturning | bool | 1 | Order return available | If on, the PP can accept returns | ||
| 18 | haveTryOn | bool | 1 | Fitting rooms and try-on available | If on, the PP has fitting rooms | ||
| 19 | havePartialBuy | bool | 1 | Partial purchase available | I.e. the PP can carry out a partial hand-out | ||
| 20 | packageMinWeight | int | 1 | Minimum parcel weight for this PP, in grams | |||
| 21 | packageMaxWeight | int | 1 | Maximum parcel weight for this PP, in grams | |||
| 22 | packageMaxLength | decimal | 1 | Maximum parcel length for the PP, in centimeters. | Along the X axis. Precise to two decimal places | ||
| 23 | packageMaxHeight | decimal | 1 | Maximum parcel height for the PP, in centimeters. | Along the Y axis. Precise to two decimal places | ||
| 24 | packageMaxWidth | decimal | 1 | Maximum parcel width for the PP, in centimeters. | Along the Z axis. Precise to two decimal places | ||
| 25 | paymentOptions | object | 1 | Object with payment-on-receipt options | |||
| 26 | haveCashPayment | bool | 1 | Cash-on-delivery available (post-payment) | If on, payment on receipt is possible | ||
| 27 | haveCardPayment | bool | 1 | Card payment available (terminal) | If on, the PP accepts card payment | ||
| 28 | haveQrCodePayment | bool | 1 | QR-code payment available (terminal, PP software) | If on, the PP has QR-code payment | ||
Request example
{
"countryISOCode": "RU",
"deliveryServiceCode": "EXAMPLE_CS",
"id": "PP-SPB-001",
"type": "PICKPOINT",
"address": {
"addressType": "gar",
"fullAddress": "190000, Saint Petersburg, Nevsky Ave., 28",
"regionFias": "c2deb16a-0330-4f05-821f-1d12d16a218a",
"cityFias": "f1a154e5-7982-4d4b-a70d-5e9a01350320",
"houseFias": "a1b2c3d4-5678-90ef-1234-567890abcdef",
"flat": "",
"latitude": 58.0167,
"longitude": 56.235,
"addressComment": "2nd floor, near the escalator"
},
"openingHours": [
{
"dayOfWeek": 1,
"workingDay": true,
"opens": "09:00:00",
"closes": "21:00:00"
},
{
"dayOfWeek": 2,
"workingDay": true,
"opens": "09:00:00",
"closes": "21:00:00"
},
{
"dayOfWeek": 3,
"workingDay": true,
"opens": "09:00:00",
"closes": "21:00:00"
},
{
"dayOfWeek": 4,
"workingDay": true,
"opens": "09:00:00",
"closes": "21:00:00"
},
{
"dayOfWeek": 5,
"workingDay": true,
"opens": "09:00:00",
"closes": "21:00:00"
},
{
"dayOfWeek": 6,
"workingDay": true,
"opens": "10:00:00",
"closes": "20:00:00"
},
{
"dayOfWeek": 7,
"workingDay": false,
"opens": null,
"closes": null
}
],
"phoneNumber": "78121234567",
"isAvailable": true,
"orderStoragePeriod": 5,
"options": {
"orderIssuing": true,
"orderReturning": true,
"haveTryOn": true,
"havePartialBuy": true,
"packageMinWeight": 150,
"packageMaxWeight": 10000,
"packageMaxLength": 100,
"packageMaxHeight": 100,
"packageMaxWidth": 100
},
"paymentOptions": {
"haveCashPayment": true,
"haveCardPayment": true,
"haveQrCodePayment": true
}
}
Response
Response Codes and Messages
| Code | Status | Message | Reason |
|---|---|---|---|
| 200 | OK | A new pickpoint has been created | Everything completed successfully. A new PP was created in the Gold Apple IS directory |
| 400 | Bad Request | Missing or inappropriate required parameters | Required parameters are missing or invalid |
| 401 | Unauthorized | Token is invalid | Authentication error at the courier service |
| 403 | Forbidden | Has no permission | Insufficient permissions |
| 500 | Internal Server Error | Server unavailable | The server is unavailable |
Response Parameters
| Parameter | Data type | Required | Description | Comment |
|---|---|---|---|---|
| id | string | 1 | Confirmed PP code, as passed by the courier service upon creation | Example: "PP-SPB-001" |
Successful response example
{
"id": "PP-SPB-001"
}
Unsuccessful Response Parameters
| Parameter | Data type | Required | Description | Comment |
|---|---|---|---|---|
| error | string | 1 | Human-readable description of the error | see the "Response Codes and Messages" section |
Unsuccessful response example
{
"error": "Invalid request format"
}