Files
Sipro-Marketplaces/pkg/api/yandex/ymclient/docs/WarehousesAPI.md
2025-08-15 11:10:28 +03:00

13 KiB
Raw Blame History

\WarehousesAPI

All URIs are relative to https://api.partner.market.yandex.ru

Method HTTP request Description
GetFulfillmentWarehouses Get /warehouses Идентификаторы складов Маркета
GetPagedWarehouses Post /businesses/{businessId}/warehouses Список складов
GetWarehouses Get /businesses/{businessId}/warehouses Список складов и групп складов
UpdateWarehouseStatus Post /campaigns/{campaignId}/warehouse/status Изменение статуса склада

GetFulfillmentWarehouses

GetFulfillmentWarehousesResponse GetFulfillmentWarehouses(ctx).Execute()

Идентификаторы складов Маркета

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.WarehousesAPI.GetFulfillmentWarehouses(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `WarehousesAPI.GetFulfillmentWarehouses``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetFulfillmentWarehouses`: GetFulfillmentWarehousesResponse
	fmt.Fprintf(os.Stdout, "Response from `WarehousesAPI.GetFulfillmentWarehouses`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiGetFulfillmentWarehousesRequest struct via the builder pattern

Return type

GetFulfillmentWarehousesResponse

Authorization

ApiKey, OAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetPagedWarehouses

GetPagedWarehousesResponse GetPagedWarehouses(ctx, businessId).PageToken(pageToken).Limit(limit).GetPagedWarehousesRequest(getPagedWarehousesRequest).Execute()

Список складов

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
	businessId := int64(789) // int64 | Идентификатор кабинета. Чтобы его узнать, воспользуйтесь запросом [:no-translate[GET campaigns]](:no-translate[../../reference/campaigns/getCampaigns.md]).   [Что такое кабинет и магазин на Маркете](:no-translate[https://yandex.ru/support/marketplace/account/introduction.html]) 
	pageToken := "eyBuZXh0SWQ6IDIzNDIgfQ==" // string | Идентификатор страницы c результатами.  Если параметр не указан, возвращается первая страница.  Рекомендуем передавать значение выходного параметра :no-translate[`nextPageToken`], полученное при последнем запросе.  Если задан :no-translate[`page_token`] и в запросе есть параметры :no-translate[`page`] и :no-translate[`pageSize`], они игнорируются.  (optional)
	limit := int32(20) // int32 | Количество значений на одной странице.  (optional)
	getPagedWarehousesRequest := *openapiclient.NewGetPagedWarehousesRequest() // GetPagedWarehousesRequest |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.WarehousesAPI.GetPagedWarehouses(context.Background(), businessId).PageToken(pageToken).Limit(limit).GetPagedWarehousesRequest(getPagedWarehousesRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `WarehousesAPI.GetPagedWarehouses``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetPagedWarehouses`: GetPagedWarehousesResponse
	fmt.Fprintf(os.Stdout, "Response from `WarehousesAPI.GetPagedWarehouses`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
businessId int64 Идентификатор кабинета. Чтобы его узнать, воспользуйтесь запросом :no-translate[GET campaigns]. Что такое кабинет и магазин на Маркете

Other Parameters

Other parameters are passed through a pointer to a apiGetPagedWarehousesRequest struct via the builder pattern

Name Type Description Notes

pageToken | string | Идентификатор страницы c результатами. Если параметр не указан, возвращается первая страница. Рекомендуем передавать значение выходного параметра :no-translate[`nextPageToken`], полученное при последнем запросе. Если задан :no-translate[`page_token`] и в запросе есть параметры :no-translate[`page`] и :no-translate[`pageSize`], они игнорируются. | limit | int32 | Количество значений на одной странице. | getPagedWarehousesRequest | GetPagedWarehousesRequest | |

Return type

GetPagedWarehousesResponse

Authorization

ApiKey, OAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetWarehouses

GetWarehousesResponse GetWarehouses(ctx, businessId).Execute()

Список складов и групп складов

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
	businessId := int64(789) // int64 | Идентификатор кабинета. Чтобы его узнать, воспользуйтесь запросом [:no-translate[GET campaigns]](:no-translate[../../reference/campaigns/getCampaigns.md]).   [Что такое кабинет и магазин на Маркете](:no-translate[https://yandex.ru/support/marketplace/account/introduction.html]) 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.WarehousesAPI.GetWarehouses(context.Background(), businessId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `WarehousesAPI.GetWarehouses``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetWarehouses`: GetWarehousesResponse
	fmt.Fprintf(os.Stdout, "Response from `WarehousesAPI.GetWarehouses`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
businessId int64 Идентификатор кабинета. Чтобы его узнать, воспользуйтесь запросом :no-translate[GET campaigns]. Что такое кабинет и магазин на Маркете

Other Parameters

Other parameters are passed through a pointer to a apiGetWarehousesRequest struct via the builder pattern

Name Type Description Notes

Return type

GetWarehousesResponse

Authorization

ApiKey, OAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdateWarehouseStatus

UpdateWarehouseStatusResponse UpdateWarehouseStatus(ctx, campaignId).UpdateWarehouseStatusRequest(updateWarehouseStatusRequest).Execute()

Изменение статуса склада

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
	campaignId := int64(789) // int64 | Идентификатор кампании.  Его можно узнать с помощью запроса [:no-translate[GET campaigns]](:no-translate[../../reference/campaigns/getCampaigns.md]) или найти в кабинете продавца на Маркете — нажмите на название своего бизнеса и перейдите на страницу:    * **Модули и :no-translate[API]** → блок **Передача данных Маркету**.   * **Лог запросов** → выпадающий список в блоке **Показывать логи**.  ⚠️ Не передавайте вместо него идентификатор магазина, который указан в кабинете продавца на Маркете рядом с названием магазина и в некоторых отчетах. 
	updateWarehouseStatusRequest := *openapiclient.NewUpdateWarehouseStatusRequest(false) // UpdateWarehouseStatusRequest | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.WarehousesAPI.UpdateWarehouseStatus(context.Background(), campaignId).UpdateWarehouseStatusRequest(updateWarehouseStatusRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `WarehousesAPI.UpdateWarehouseStatus``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `UpdateWarehouseStatus`: UpdateWarehouseStatusResponse
	fmt.Fprintf(os.Stdout, "Response from `WarehousesAPI.UpdateWarehouseStatus`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
campaignId int64 Идентификатор кампании. Его можно узнать с помощью запроса :no-translate[GET campaigns] или найти в кабинете продавца на Маркете — нажмите на название своего бизнеса и перейдите на страницу: * Модули и :no-translate[API] → блок Передача данных Маркету. * Лог запросов → выпадающий список в блоке Показывать логи. ⚠️ Не передавайте вместо него идентификатор магазина, который указан в кабинете продавца на Маркете рядом с названием магазина и в некоторых отчетах.

Other Parameters

Other parameters are passed through a pointer to a apiUpdateWarehouseStatusRequest struct via the builder pattern

Name Type Description Notes

updateWarehouseStatusRequest | UpdateWarehouseStatusRequest | |

Return type

UpdateWarehouseStatusResponse

Authorization

ApiKey, OAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]