jrhoads23
jrhoads23

Reputation: 59

NetSuite REST API - How to add carrier specific (FedEx, UPS, ..) tracking number to Packages tab of a fulfillment via REST call?

We have an application that needs to update our Item Fulfillments in NetSuite by adding tracking numbers to the Packages tab. If the ship method of the fulfillment is FedEx, UPS or USPS - NetSuite has separate types for those packages that contain details related to that carrier. If it is something any other ship method, you can just use their general "package" element.

I can get a tracking number added to the Packages tab when the ship method is something OTHER than those carriers. I cannot get a FedEx, UPS or USPS specific tracking number added. I am guessing there is specific syntax needed for each of those carriers and I have been unable to find any documentation on it

To add a tracking number for a general ship method (NOT FedEx, UPS or USPS):

URL: https://XXXXXXX.suitetalk.api.netsuite.com/services/rest/record/v1/itemFulfillment/ZZZZZZZ

Method: PATCH

where XXXXXXX is your NetSuite Realm and ZZZZZZZ is the internal ID for the fulfillment

Body:

{
    "package" : {
        "items" : [
            {
                "packageTrackingNumber" : "999988887777",
                "packageWeight" : 1
            }
        ]
    }
}

Note: you must have a user created with appropriate permissions along with Consumer and Token keys generated - which I have already done

The above works (again - when the ship method is not FedEx, UPS or USPS)

The NetSuite REST Browser helped me with the above call. But I can't find anything related to carrier specific packages and getting those added

Does anyone know, or have examples, of adding a FedEx tracking number to a fulfillment which has FedEx specified as the ship method?

EDIT: I thought there were properties for packageFedEx, packageUps and packageUsps and I could use those. But when I try to use them in my REST call, I get the following error in the headers (I get the same error with packageups and packageusps):

Unknown field name packagefedex. The field does not exist on this record instance.

Upvotes: 0

Views: 385

Answers (1)

Simon Camilleri
Simon Camilleri

Reputation: 1

The package sublist and field ids differ according to the shipping item being used. You may also need to set the 'carrierform' to prep the fulfillment for using the correct package sublist.

Carrier Form Sublist Weight Tracking Description
fedex packagefedex packageweightfedex packagetrackingnumberfedex (reference1fedex)
usps packageusps packageweightusps packagetrackingnumberusps packagedescrusps
ns package packageweight packagetrackingnumber packagedescr
ups pacakageups packageweightups packagetrackingnumberups packagedescrups

Upvotes: 0

Related Questions