Skip to main content

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 typePOST
Path / URL/api/v1/pickpoints/add
DescriptionMethod for adding one PP to the directory stored in the Gold Apple IS. One request — one PP added.
DirectionThe request is executed by the courier service. The response is provided by the Gold Apple IS.

Request​

Header Parameters​

ParameterData typeRequiredDescriptionComment
Authorizationstring1Access token issued by the servicesee the Authorization in the Service method
content-typestring1Request content typeFilled in as "application/json"

Request Parameters​

№ParameterData typeRequiredDescriptionComment
1countryISOCodestring (2)1Courier service country codePer the "ISO 3166-1, alpha-2" standard
2deliveryServiceCodestring (100)1Courier service codeAgreed upon during system integration
3idstring (100)1Courier service PP identifierPassed by the courier service
4typestring (20)1Pick-up point typeSee "Format Tables" → "Table 1"
5addressobject1Object containing address data
6Address object typeobject1Object containing address information.Address object (see Appendix: Address Data Types)
7openingHoursarray of objects1Array of PP working-hours objects
8dayOfWeekenum1Identifier of the day for which the working schedule is setSee "Format Tables" → "Table 3"
9workingDaybool1Working-day flagIf on, the PP operates on this day of the week
10opensstring (15)0PP opening timePer the "ISO 8601" standard (hh:mm:ss)
11closesstring (15)0PP closing timePer the "ISO 8601" standard (hh:mm:ss)
12phoneNumberstring (20)0PP phone numberNo special characters, digits only (country code and area code)
13isAvailableboolean1PP availability statusIf the flag is on, the PP is active; if off, it is not
14orderStoragePeriodint1Order storage period, in calendar daysExample: 5
15optionsobject1Object with options available at the PP
16orderIssuingbool1Order issuing availableIf on, the PP can hand out orders
17orderReturningbool1Order return availableIf on, the PP can accept returns
18haveTryOnbool1Fitting rooms and try-on availableIf on, the PP has fitting rooms
19havePartialBuybool1Partial purchase availableI.e. the PP can carry out a partial hand-out
20packageMinWeightint1Minimum parcel weight for this PP, in grams
21packageMaxWeightint1Maximum parcel weight for this PP, in grams
22packageMaxLengthdecimal1Maximum parcel length for the PP, in centimeters.Along the X axis. Precise to two decimal places
23packageMaxHeightdecimal1Maximum parcel height for the PP, in centimeters.Along the Y axis. Precise to two decimal places
24packageMaxWidthdecimal1Maximum parcel width for the PP, in centimeters.Along the Z axis. Precise to two decimal places
25paymentOptionsobject1Object with payment-on-receipt options
26haveCashPaymentbool1Cash-on-delivery available (post-payment)If on, payment on receipt is possible
27haveCardPaymentbool1Card payment available (terminal)If on, the PP accepts card payment
28haveQrCodePaymentbool1QR-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​

CodeStatusMessageReason
200OKA new pickpoint has been createdEverything completed successfully. A new PP was created in the Gold Apple IS directory
400Bad RequestMissing or inappropriate required parametersRequired parameters are missing or invalid
401UnauthorizedToken is invalidAuthentication error at the courier service
403ForbiddenHas no permissionInsufficient permissions
500Internal Server ErrorServer unavailableThe server is unavailable

Response Parameters​

ParameterData typeRequiredDescriptionComment
idstring1Confirmed PP code, as passed by the courier service upon creationExample: "PP-SPB-001"

Successful response example​

{
"id": "PP-SPB-001"
}

Unsuccessful Response Parameters​

ParameterData typeRequiredDescriptionComment
errorstring1Human-readable description of the errorsee the "Response Codes and Messages" section

Unsuccessful response example​

{
"error": "Invalid request format"
}