@thisall

Как решить timeout с интеграцией Yandex GO?

Доброго времени суток, хочу настроить интеграцию с Yandex Go, но при отправление запроса у меня выдаёт 504 timeout, может кто-то уже работал с этим API

Документация: https://yandex.ru/dev/logistics/api/ref/v2/claims/...

$link = "b2b.taxi.yandex.net/b2b/cargo/integration/v2/claims/create?request_id={$order_id}";

        $items = [
            'callback_properties' => [
                'callback_url' => 'https://rest.yelm.io/api/integration/yandex/callback'
            ],
            'client_requirements' => [
                'cargo_options' => [
                    'thermobag', 'auto_courier'
                ],
                'taxi_class' => 'express'
            ],
            'emergency_contact' => [
                'name' => 'Пользователь',
                'phone' => $order->phone
            ],
            'items' => [
                [
                    'cost_currency' => 'RUB',
                    'cost_value' => $order->end_total,
                    'droppof_point' => $droppof_point,
                    'pickup_point' => $pickup_point,
                    'quantity' => 1,
                    'size' => [
                        'height' => 0.36,
                        'length' => 0.20,
                        'width' => 0.32
                    ],
                    'title' => "Заказ из магазина Енот №{$order->id}"
                ],
            ],
            'route_points' => [
                'route_points' => [
                    [
                        'address' => [
                            'coordinates' => [$order->longitude, $order->latitude],
                            'fullname' => $data->getResponse()->getFullAddress(),
                            'comment' => $order->comment,
                            'flat' => $order->flat,
                            'floor' => $order->floor
                        ],
                        'contact' => [
                            'name' => 'Пользователь',
                            'phone' => $order->phone
                        ],
                        'point_id' => $point_id,
                        'type' => 'source' 
                    ]
                ]
            ]
        ];

        $headers = [
            'Accept-Language' => 'ru',
            'Authorization' => "Bearer tyt token",
            'Content-Type' => 'application/json'
        ];

        $response = Http::withHeaders($headers)->post($link, $items);
  • Вопрос задан
  • 158 просмотров
Решения вопроса 1
@thisall Автор вопроса
Была опечатка в ссылке
Ответ написан
Комментировать
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы