Skip to content

LIMS-2067: Create callback function for cancelled pickups#1029

Open
ndg63276 wants to merge 1 commit intomasterfrom
improvement/LIMS-2067/callback-function-for-cancelled-pickups
Open

LIMS-2067: Create callback function for cancelled pickups#1029
ndg63276 wants to merge 1 commit intomasterfrom
improvement/LIMS-2067/callback-function-for-cancelled-pickups

Conversation

@ndg63276
Copy link
Collaborator

@ndg63276 ndg63276 commented Feb 4, 2026

JIRA ticket: LIMS-2067

Summary:

If a user cancels a pickup in the shipping service, this should be reflected in Synchweb.

Changes:

  • Make the confirmpickup callback URL more general, and allow the shipment status to be set to 'pickup cancelled' or 'awb requested' in addition to 'awb created' and 'pickup booked'.

To test:

  • Find a shipment in a test proposal with a shipment service token, using eg
select shippingId, d.extra from Dewar d inner join Shipping using (shippingId) inner join Proposal using (proposalId) where proposalNumber=23694 and d.extra is not null;
  • Using curl or python requests or similar, set the URL to be
<your server>/api/shipment/dewars/confirmpickup/sid/<shipping id>/77572/token/<token>
  • Send a POST request with this as the body in JSON
{ "status": "CREATED", "tracking_number": "", "pickup_confirmation_code": ""}
  • Open the shipment page and check the shipment status and dewar status are both 'pickup cancelled' and there is a line in the history with 'pickup cancelled'
  • Resend the POST request with a status of "PENDING", check the statuses and history now say 'awb requested'
  • Resend the POST request with a status of "BOOKED", check an error is returned saying "No tracking number specified"
  • Resend the POST request with a status of "BOOKED" and a tracking_number of "123", check the statuses and history now say 'awb created' and the tracking number is displayed
  • Add some characters to the pickup_confirmation_code and resend, check the statuses now say 'pickup booked', and the history has new items for 'awb created' and 'pickup booked'

@ndg63276 ndg63276 requested a review from MattPrit February 4, 2026 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant