Lightspeed custom Shipping method custom resource

fmsthirdfmsthird Member Posts: 30
edited September 25 in Development

Hi,

By default Shipping Integration will call my /shipment_methods endpoint and expects a response like below

{
  "shipment_methods": [
    {
      "id": 1234,
      "title": "1 hour delivery",
      "description": "We'll deliver your package within one hour, inside Amsterdam.",
      "price_incl": 0.05,
      "price_excl": 0.00,
      "tax_rate": 0.21,
      "is_pickup": false,
      "is_servicepoint": false,
      "is_cash_on_delivery": false
    }
  ]
}

My question (which happens because I cannot test it on my local) is, will Lightspeed still accepts a custom/different payload like below and will still render my custom shipping method or will it throw an error?

{
  "shipment_methods": [
    {
      "id": 1234,
      "title": "1 hour delivery",
      "description": "We'll deliver your package within one hour, inside Amsterdam.",
      "price_incl": 6.05,
      "price_excl": 5.00,
      "tax_rate": 0.21,
      "is_pickup": false,
      "is_servicepoint": false,
      "is_cash_on_delivery": false,
      "my_custom_attr": "yeah_1",
      "my_custom_attr0": "boom"
    }
  ]
}  


Thank you

Best Answer

Answers

  • fmsthirdfmsthird Member Posts: 30

    Thanks for the answer @Leah . I just wanted to use the same resource for the other integration that I have. But anyway, you have answered my question already.

    Thank you again.

Sign In or Register to comment.