diff --git a/src/CoreApi.php b/src/CoreApi.php index b0132d1..28009cd 100644 --- a/src/CoreApi.php +++ b/src/CoreApi.php @@ -50,13 +50,13 @@ public function syncShop(string $authIntToken): string throw new ShopRegistrationException('[CDEKDelivery] Register shop failed', 'cdek_error.register.shop'); } - if (empty($response->data()['id'])) { + if (empty($response->getHeaders()['X-Entity-Id'])) { throw new ShopRegistrationException( '[CDEKDelivery] Failed to get shop uuid', 'cdek_error.uuid.auth', $response->data(), ); } - return $response->data()['id']; + return $response->getHeaders()['X-Entity-Id']; } /**