-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscs.php
44 lines (39 loc) · 1.03 KB
/
scs.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
$request = new HttpRequest();
$request->setUrl('https://stg.stockcontrol.jp/v2/allocate/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders(array(
'postman-token' => '3abcedbb-062b-01fc-c2d4-dcfe2279f9fa',
'cache-control' => 'no-cache',
'x-scs-signature' => 'aaa',
'x-scs-sitecode' => 'dsoms',
'content-type' => 'application/json'
));
$request->setBody('{
"total_request": 1,
"request": [
{
"no": 1,
"mode": 20,
"identification_code": "1518488160442",
"itemize": [
{
"corporation_code": "dscnt",
"site_code": "dsoms",
"new_identification_code": "",
"product_code": "JAN",
"cs_code": "JAN",
"quantity": 1,
"extra_option": {
}
}
]
}
]
}');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}