API 호출 예제
CURL
PHP
curl -X GET -H "Content-Type: application/json" -H "access-token: {ACCESS_TOKEN}" -d '{"version":"latest"}' https://api.imweb.me/v2/shop/products
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.imweb.me/v2/shop/products');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1) ;
curl_setopt($ch, CURLOPT_HTTPHEADER, ['access-token: {ACCESS_TOKEN}']);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(['version' => 'latest']));
$res = curl_exec($ch);
curl_close($ch);
항목 | 타입 | 설명 |
---|---|---|
version | string | 요청 Rest API 버전
가장 최신 버전을 사용하시려면 공백 또는 latest로 전달해주세요. |
offset | integer | 시작 페이지 기본값 : 1
목록 조회 API 요청 시 페이징 처리를 위한 데이터입니다. |
limit | integer | 페이지 사이즈 기본값 : 25
최대값 : 100
목록 조회 API 요청 시 페이징 처리를 위한 데이터입니다. |
... | 추가 요청 데이터 각 기능에 맞는 추가 요청 데이터를 전달해주셔야 합니다. |
항목 | 타입 | 설명 |
---|---|---|
msg | String | API 응답 메세지 |
code | Integer | API 응답 코드 |
request_count | Integer | API 요청 가능 횟수 |
version | String | API 버전 |
data | Array | API 응답 데이 |
Array
(
[msg] => SUCCESS
[code] => 200
[request_count] => 4
[version] => 2.0
[data] => Array
(
[list] => Array
(
[0] => Array
(
[no] => 13805
[categories] => Array
(
[0] => s201801045a4dc150f0580
)
[custom_prod_code] => 13805
[name] => Rest API 이미지 업로드 테스트
[content] => 상품설명
[content_plain] => 상품설명
...
항목 | 타입 | 설명 |
---|---|---|
data_count | Integer | 데이터 총 갯수 |
current_page | Integer | 현재 페이지 번호 |
total_page | Integer | 총 페이지 갯수 |
pagesize | Integer | 페이지 당 데이터 갯수 |
Last modified 1yr ago