For clean Markdown of any page, append .md to the page URL. For a complete documentation index, see https://developer.shipbob.com/v1.0/api/products/llms.txt. For full documentation content, see https://developer.shipbob.com/v1.0/api/products/llms-full.txt.

# 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.0
info:
  title: api-1.0
  version: 1.0.0
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:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Products.Get.Api.Product.ProductId.Bad.Request.Object
        '401':
          description: No access right at this time
          content:
            application/json:
              schema:
                description: Any type
        '403':
          description: No access
          content:
            application/json:
              schema:
                description: Any type
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Products.ProblemDetails'
servers:
  - url: https://api.shipbob.com
  - url: https://sandbox-api.shipbob.com
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
      title: Products.BundleRootInformationViewModel
    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
      description: Information about a store channel
      title: Products.ChannelViewModel
    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
      description: The inventory that store products can resolve to when packing a shipment
      title: Products.InventoryItemViewModel
    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
      description: Break down of quantities by fulfillment center
      title: Products.FulfillmentCenterQuantityViewModel
    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
      title: Products.ProductViewModel
    Products.Get.Api.Product.ProductId.Bad.Request.Object:
      type: object
      additionalProperties:
        type: array
        items:
          type: string
      title: Products.Get.Api.Product.ProductId.Bad.Request.Object
    Products.ProblemDetails:
      type: object
      properties:
        detail:
          type:
            - string
            - 'null'
        instance:
          type:
            - string
            - 'null'
        status:
          type:
            - integer
            - 'null'
        title:
          type:
            - string
            - 'null'
        type:
          type:
            - string
            - 'null'
      title: Products.ProblemDetails
  securitySchemes:
    PAT:
      type: http
      scheme: bearer
      description: Authentication using Personal Access Token (PAT) token
    OAuth2:
      type: http
      scheme: bearer
      description: OAuth2 authentication using JWT tokens

```

## SDK Code Examples

```python Products_getASingleProduct_example
import requests

url = "https://api.shipbob.com/1.0/product/productId"

headers = {"Authorization": "Bearer <token>"}

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 <token>'}};

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 <token>")

	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 <token>'

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<String> response = Unirest.get("https://api.shipbob.com/1.0/product/productId")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Products_getASingleProduct_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.shipbob.com/1.0/product/productId', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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 <token>");
IRestResponse response = client.Execute(request);
```

```swift Products_getASingleProduct_example
import Foundation

let headers = ["Authorization": "Bearer <token>"]

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()
```