# Get a single product GET https://api.shipbob.com/1.0/product/{productId} Reference: https://developer.shipbob.com/v1.0/api/products/get-a-single-product ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: | Get a single product version: endpoint_products.getASingleProduct paths: /1.0/product/{productId}: get: operationId: get-a-single-product summary: | Get a single product tags: - - subpackage_products parameters: - name: productId in: path description: Unique identifier of the product required: true schema: type: string format: int32 - name: Authorization in: header description: Authentication using Personal Access Token (PAT) token required: true schema: type: string - name: shipbob_channel_id in: header description: Channel Id for Operation required: false schema: type: string format: int32 responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/Products.ProductViewModel' '400': description: Bad Request content: {} '401': description: No access right at this time content: {} '403': description: No access content: {} '404': description: Not Found content: {} components: schemas: Products.BundleRootInformationViewModel: type: object properties: id: type: integer description: Id of the bundle root product name: type: - string - 'null' description: Name of the bundle root product Products.ChannelViewModel: type: object properties: id: type: integer description: Unique id of the store channel name: type: - string - 'null' description: Name of the store channel Products.InventoryItemViewModel: type: object properties: id: type: integer description: Unique id of the inventory item name: type: - string - 'null' description: Name of the inventory item quantity: type: integer description: Quantity of the inventory item included in a store product Products.FulfillmentCenterQuantityViewModel: type: object properties: committed_quantity: type: integer description: Amount of committed quantity at this fulfillment center fulfillable_quantity: type: integer description: Amount of fulfillable quantity at this fulfillment center id: type: integer description: Unique id of the fulfillment center name: type: - string - 'null' description: Name of the fulfillment center onhand_quantity: type: integer description: Amount of onhand quantity at this fulfillment center Products.ProductViewModel: type: object properties: barcode: type: - string - 'null' description: Barcode for the product bundle_root_information: $ref: '#/components/schemas/Products.BundleRootInformationViewModel' channel: $ref: '#/components/schemas/Products.ChannelViewModel' created_date: type: string format: date-time description: Date the product was created fulfillable_inventory_items: type: - array - 'null' items: $ref: '#/components/schemas/Products.InventoryItemViewModel' description: >- The inventory that this product will resolve to when packing a shipment fulfillable_quantity_by_fulfillment_center: type: - array - 'null' items: $ref: '#/components/schemas/Products.FulfillmentCenterQuantityViewModel' description: >- Fulfillable quantity of this product broken down by fulfillment center location gtin: type: - string - 'null' description: >- Global Trade Item Number - unique and internationally recognized identifier assigned to item by company GS1. id: type: integer description: Unique identifier of the product name: type: - string - 'null' description: The name of the product reference_id: type: - string - 'null' description: Unique reference identifier of the product sku: type: - string - 'null' description: Stock keeping unit for the product total_committed_quantity: type: integer description: Total committed quantity of this product total_fulfillable_quantity: type: integer description: Total fulfillable quantity of this product total_onhand_quantity: type: integer description: Total on hand quantity of this product unit_price: type: - number - 'null' format: double description: The price of one unit upc: type: - string - 'null' description: Universal Product Code - Unique external identifier ``` ## SDK Code Examples ```python Products_getASingleProduct_example import requests url = "https://api.shipbob.com/1.0/product/productId" headers = {"Authorization": "Bearer "} response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript Products_getASingleProduct_example const url = 'https://api.shipbob.com/1.0/product/productId'; const options = {method: 'GET', headers: {Authorization: 'Bearer '}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Products_getASingleProduct_example package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.shipbob.com/1.0/product/productId" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Products_getASingleProduct_example require 'uri' require 'net/http' url = URI("https://api.shipbob.com/1.0/product/productId") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ``` ```java Products_getASingleProduct_example import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.shipbob.com/1.0/product/productId") .header("Authorization", "Bearer ") .asString(); ``` ```php Products_getASingleProduct_example request('GET', 'https://api.shipbob.com/1.0/product/productId', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` ```csharp Products_getASingleProduct_example using RestSharp; var client = new RestClient("https://api.shipbob.com/1.0/product/productId"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer "); IRestResponse response = client.Execute(request); ``` ```swift Products_getASingleProduct_example import Foundation let headers = ["Authorization": "Bearer "] let request = NSMutableURLRequest(url: NSURL(string: "https://api.shipbob.com/1.0/product/productId")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```