All URIs are relative to https://.commercelayer.io/api
Method | HTTP request | Description |
---|---|---|
DELETEInventoryModelsInventoryModelId | Delete /inventory_models/{inventoryModelId} | Delete an inventory model |
GETInventoryModels | Get /inventory_models | List all inventory models |
GETInventoryModelsInventoryModelId | Get /inventory_models/{inventoryModelId} | Retrieve an inventory model |
GETInventoryReturnLocationIdInventoryModel | Get /inventory_return_locations/{inventoryReturnLocationId}/inventory_model | Retrieve the inventory model associated to the inventory return location |
GETInventoryStockLocationIdInventoryModel | Get /inventory_stock_locations/{inventoryStockLocationId}/inventory_model | Retrieve the inventory model associated to the inventory stock location |
GETMarketIdInventoryModel | Get /markets/{marketId}/inventory_model | Retrieve the inventory model associated to the market |
PATCHInventoryModelsInventoryModelId | Patch /inventory_models/{inventoryModelId} | Update an inventory model |
POSTInventoryModels | Post /inventory_models | Create an inventory model |
DELETEInventoryModelsInventoryModelId(ctx, inventoryModelId).Execute()
Delete an inventory model
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/incentro-dc/go-commercelayer-sdk/api"
)
func main() {
inventoryModelId := TODO // interface{} | The resource's id
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.InventoryModelsApi.DELETEInventoryModelsInventoryModelId(context.Background(), inventoryModelId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InventoryModelsApi.DELETEInventoryModelsInventoryModelId``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
inventoryModelId | interface{} | The resource's id |
Other parameters are passed through a pointer to a apiDELETEInventoryModelsInventoryModelIdRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GETInventoryModels200Response GETInventoryModels(ctx).Execute()
List all inventory models
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/incentro-dc/go-commercelayer-sdk/api"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.InventoryModelsApi.GETInventoryModels(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InventoryModelsApi.GETInventoryModels``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GETInventoryModels`: GETInventoryModels200Response
fmt.Fprintf(os.Stdout, "Response from `InventoryModelsApi.GETInventoryModels`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGETInventoryModelsRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/vnd.api+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GETInventoryModelsInventoryModelId200Response GETInventoryModelsInventoryModelId(ctx, inventoryModelId).Execute()
Retrieve an inventory model
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/incentro-dc/go-commercelayer-sdk/api"
)
func main() {
inventoryModelId := TODO // interface{} | The resource's id
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.InventoryModelsApi.GETInventoryModelsInventoryModelId(context.Background(), inventoryModelId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InventoryModelsApi.GETInventoryModelsInventoryModelId``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GETInventoryModelsInventoryModelId`: GETInventoryModelsInventoryModelId200Response
fmt.Fprintf(os.Stdout, "Response from `InventoryModelsApi.GETInventoryModelsInventoryModelId`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
inventoryModelId | interface{} | The resource's id |
Other parameters are passed through a pointer to a apiGETInventoryModelsInventoryModelIdRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
GETInventoryModelsInventoryModelId200Response
- Content-Type: Not defined
- Accept: application/vnd.api+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GETInventoryReturnLocationIdInventoryModel(ctx, inventoryReturnLocationId).Execute()
Retrieve the inventory model associated to the inventory return location
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/incentro-dc/go-commercelayer-sdk/api"
)
func main() {
inventoryReturnLocationId := TODO // interface{} | The resource's id
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.InventoryModelsApi.GETInventoryReturnLocationIdInventoryModel(context.Background(), inventoryReturnLocationId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InventoryModelsApi.GETInventoryReturnLocationIdInventoryModel``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
inventoryReturnLocationId | interface{} | The resource's id |
Other parameters are passed through a pointer to a apiGETInventoryReturnLocationIdInventoryModelRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GETInventoryStockLocationIdInventoryModel(ctx, inventoryStockLocationId).Execute()
Retrieve the inventory model associated to the inventory stock location
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/incentro-dc/go-commercelayer-sdk/api"
)
func main() {
inventoryStockLocationId := TODO // interface{} | The resource's id
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.InventoryModelsApi.GETInventoryStockLocationIdInventoryModel(context.Background(), inventoryStockLocationId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InventoryModelsApi.GETInventoryStockLocationIdInventoryModel``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
inventoryStockLocationId | interface{} | The resource's id |
Other parameters are passed through a pointer to a apiGETInventoryStockLocationIdInventoryModelRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GETMarketIdInventoryModel(ctx, marketId).Execute()
Retrieve the inventory model associated to the market
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/incentro-dc/go-commercelayer-sdk/api"
)
func main() {
marketId := TODO // interface{} | The resource's id
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.InventoryModelsApi.GETMarketIdInventoryModel(context.Background(), marketId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InventoryModelsApi.GETMarketIdInventoryModel``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
marketId | interface{} | The resource's id |
Other parameters are passed through a pointer to a apiGETMarketIdInventoryModelRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PATCHInventoryModelsInventoryModelId200Response PATCHInventoryModelsInventoryModelId(ctx, inventoryModelId).InventoryModelUpdate(inventoryModelUpdate).Execute()
Update an inventory model
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/incentro-dc/go-commercelayer-sdk/api"
)
func main() {
inventoryModelUpdate := *openapiclient.NewInventoryModelUpdate(*openapiclient.NewInventoryModelUpdateData(interface{}(123), interface{}(XGZwpOSrWL), *openapiclient.NewPATCHInventoryModelsInventoryModelId200ResponseDataAttributes())) // InventoryModelUpdate |
inventoryModelId := TODO // interface{} | The resource's id
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.InventoryModelsApi.PATCHInventoryModelsInventoryModelId(context.Background(), inventoryModelId).InventoryModelUpdate(inventoryModelUpdate).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InventoryModelsApi.PATCHInventoryModelsInventoryModelId``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PATCHInventoryModelsInventoryModelId`: PATCHInventoryModelsInventoryModelId200Response
fmt.Fprintf(os.Stdout, "Response from `InventoryModelsApi.PATCHInventoryModelsInventoryModelId`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
inventoryModelId | interface{} | The resource's id |
Other parameters are passed through a pointer to a apiPATCHInventoryModelsInventoryModelIdRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
inventoryModelUpdate | InventoryModelUpdate |
PATCHInventoryModelsInventoryModelId200Response
- Content-Type: application/vnd.api+json
- Accept: application/vnd.api+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
POSTInventoryModels201Response POSTInventoryModels(ctx).InventoryModelCreate(inventoryModelCreate).Execute()
Create an inventory model
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/incentro-dc/go-commercelayer-sdk/api"
)
func main() {
inventoryModelCreate := *openapiclient.NewInventoryModelCreate(*openapiclient.NewInventoryModelCreateData(interface{}(123), *openapiclient.NewPOSTInventoryModels201ResponseDataAttributes(interface{}(EU Inventory Model)))) // InventoryModelCreate |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.InventoryModelsApi.POSTInventoryModels(context.Background()).InventoryModelCreate(inventoryModelCreate).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InventoryModelsApi.POSTInventoryModels``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `POSTInventoryModels`: POSTInventoryModels201Response
fmt.Fprintf(os.Stdout, "Response from `InventoryModelsApi.POSTInventoryModels`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiPOSTInventoryModelsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
inventoryModelCreate | InventoryModelCreate |
POSTInventoryModels201Response
- Content-Type: application/vnd.api+json
- Accept: application/vnd.api+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]