Covers all questions related to inventory management, order fulfillment, and shipping.
what I want to do?
I want to add a company as a logistics and delivery provider such as UPS for my shop, this company is my delivery provider.
my problem is :
I add a custom app for my shop. and the app register a carrier service to shopify successfully, the company name is "my carrier service", but I can't find it in the shipping carrier list company list(as blow).
(the app got the access scope "shipping" )
thank you!
my code is like this:
public CarrierServiceBo createCarrierService(String name, String callBackUrl) throws IOException { String url = String.format(carrierServiceUrl, devStoreNo); Map<String, String> headers = new HashMap<>(); headers.put("Content-Type","application/json"); headers.put("X-Shopify-Access-Token", token); CarrierServiceCreateReq carrierServiceCreateReq = new CarrierServiceCreateReq(); carrierServiceCreateReq.getCarrier_service().setName(name); carrierServiceCreateReq.getCarrier_service().setCallback_url(callBackUrl); HttpClientResult clientResult = HttpClientUtil.post(url, GSON.toJson(carrierServiceCreateReq), "application/json", headers); log.info("response: {}", GSON.toJson(clientResult)); if (clientResult.getCode() != 201) { return null; } String content = clientResult.getContent(); CarrierServiceBoRoot carrierServiceBoRoot = GSON.fromJson(content, CarrierServiceBoRoot.class); return carrierServiceBoRoot.getCarrier_service(); }
Hi Bimingda
Where exactly are you setting the company name as "my carrier service"?
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Dear @Liam, thanks for your reply.
the name "my carrier service" is set out the function createCarrierService like this.
CarrierServiceBo carrierServiceBo = carrierServiceBiz.createCarrierService("my carrier service", callBackUrl);
hi @bimingda
I've answered the same question here, you can have a look: https://community.shopify.com/c/shopify-apps/how-can-i-add-a-company-as-a-logistics-and-delivery-pro...
Hope this helps you😀