Sendcloud service point picker: API integration demo
47 |54 | Options 55 |
56 |446 | Usage 447 |
448 |452 | Begin by adding our script to your HTML page: 453 |
454 | 455 |<script src="https://embed.sendcloud.sc/spp/1.0.0/api.min.js"></script>
456 |
457 |
458 | You need to provide sendcloud.servicePoints.open
a config object, a success callback function and an error callback function.
459 |
The example on this page uses the following code:
462 | 463 |
464 | 472 | Selected service point 473 |
474 |
478 | You now need to send the retrieved data to Sendcloud’s Parcel API (described in https://docs.sendcloud.sc/api/v2/index.html#parcel). When creating a new parcel you’ll need to forward the delivery address as stated in the result below among with the service point ID in the to_service_point
field. Be aware that the service point IDs have limited lifetime and change constantly. They weren’t designed for persistance.
479 |
482 | When creating shipments with service points always send the to_post_number
field with the value returned by the service point selection.
483 |
486 | Post number:
487 | Service point:
488 |
491 |