API 기준 URI 끝점
모든 API 호출의 끝점은 https://app.prodsmart.com/입니다.
인증
Prodsmart API는 간단한 토큰 인증을 사용합니다. 먼저 새 토큰을 작성하거나 기존 토큰을 획득합니다. 토큰을 획득한 후에는 이를 사용하여 토큰의 범위 내에서 다른 리소스에 액세스할 수 있습니다.
인증 토큰은 2시간 동안 지속된 다음 API 자격 증명을 사용하여 새 인증 토큰을 요청해야 합니다.
미디어 유형
메시지 본문이 있는 요청이 리소스 상태를 설정하거나 업데이트하기 위해 일반 JSON을 사용하고 있습니다.
오류 상태
공통 HTTP 응답 상태 코드가 사용됩니다.
잘못된 JSON
"잘못된 JSON"이라는 응답을 받으면 JSONLint에서 사용 중인 JSON 페이로드의 유효성을 확인하십시오.
속도 제한
API 요청은 분당 120개 요청으로 제한됩니다. 제한을 초과하면 후속 요청은 HTTP 상태 코드 429가 너무 많은 요청인 응답을 받습니다.
또한 헤더에는 요청을 다시 시도하기 전에 대기해야 하는 시간(초)이 표시됩니다.
Retry-After: <delay-seconds>
비율 제한을 처리하기 위한 모범 사례:
응답이 제한될 수 있는 사용량 급증을 방지하기 위해 시간이 지남에 따라 요청을 균등하게 분산
Retry-After 정보를 사용하여 요청이 재시도될 수 있는 시기를 파악하는 논리 개발
모든 통합이 제한에 도달하므로 불필요한 통합이 동시에 실행되지 않도록 하십시오.
날짜 형식
API 날짜 필드 형식은 ISO 8601의 표현을 따릅니다.
YYYY-MM-DDThh:mm:ssZ
이 형식에서 문자 T는 필요한 구분 기호로 작동하는 반면 Z는 필요한 경우 시간대 지정자입니다. Z가 사용되지 않으면 날짜에 적용된 시간대는 Prodsmart 회사에 설정된 시간대와 동일합니다. Z는 0으로 간격띄우기되므로 0 시간대를 나타냅니다.
사용 예:
사용 중인 시간이 UTC보다 1시간 앞에 있는 경우 영역 지정자는 "+01:00", "+0100" 또는 단순히 "+01"이어야 합니다.
회사 시간대가 -05:00으로 설정되고 보낸 날짜의 형식은 2020-07-20T09:15:15Z인 경우 날짜는 Prodsmart에서 07/20/2020 - 04:15:15로 표시됩니다.
보내는 형식이 2020-07-20T09:15:15인 경우 날짜는 Prodsmart에서 07/20/2020 - 09:15:15(-05:00 시간대가 있는 경우)로 표시됩니다. 사용자의 시간대가 -04:00으로 설정되어 있으면 다음과 같이 표시됩니다. 07/20/2020 - 10:15:15
공통 ERP 통합
ERP 통합에 대한 일반적인 시나리오는 주로 생산 주문, 재고 및 제품 카탈로그의 동기화입니다.
생산 주문
ERP측에서 생산 주문이 작성되면 ERP는 생산 주문 작성 서비스를 사용하여 JSON 형식의 생산 주문 데이터를 Prodsmart의 API로 보내야 합니다. Prodsmart에서 생산 주문이 작성 또는 업데이트될 때 ERP 측을 업데이트해야 하는 경우 두 가지 가능성이 있습니다. ERP는 외부에서 연결할 수 있고, 이 경우 Prodsmart에서 웹후크를 설정할 수 있으며, Prodsmart 측에서 생산 주문을 작성, 업데이트 및 삭제할 때 웹후크가 호출됩니다. 외부에서 ERP에 접속할 수 없는 경우 ERP는 변경 사항을 감지하기 위해 생산 주문 리스트 서비스를 적극적으로 폴링해야 합니다.
재고
일반적으로 ERP(또는 WMS)는 재고의 마스터이므로 ERP/WMS에서 제품의 현재 재고를 특정 수량으로 업데이트할 수 있는 서비스(제품 재고 업데이트)를 제공합니다. 경우에 따라 ERP/WMS는 생산 주문에 대한 변경 사항을 확인하거나 웹후크 또는 현재 재고 웹 서비스(요청 시)를 사용하여 생산 재고 변경에 대한 알림을 받을 수 있습니다.
제품
제품 카탈로그도 자주 동기화되지는 않습니다. 이 경우 ERP는 항상 마스터이며 제품 작성 서비스를 사용하여 제품 및 작업을 작성할 수 있습니다.
웹후크
웹후크는 앱의 통합 메뉴에서 생산 주문 이벤트에 사용할 수 있습니다. 이 기능을 사용하려면 수신하려는 알림 이벤트가 있는 끝점 URL 콜백을 추가하십시오. Autodesk는 시스템에서 이벤트가 발생하는 즉시 웹후크 알림을 전송하려고 노력합니다. 동시에 많은 수의 생산 주문이 변경된 경우 짧은 시간 내에 많은 알림이 전송될 수 있습니다. 현재 재시도는 지원되지 않습니다.
헤더
웹후크 헤더
x-prodsmart-topic: "productionOrder/create"x-prodsmart-hmac-sha256: "c938fe31379c0d89b37468e1cae9e3aab2d56834"x-prodsmart-api-version: "1"x-prodsmart-webhook-uuid: "91cb972d-b476-4936-947c-4be471b9da5b"x-prodsmart-triggered-at: "2023-08-29T20:39:46.142Z"
노트:
x-prodsmart-topic - 웹후크의 항목 식별
x-prodsmart-hmac-sha256 - 웹후크의 원점을 확인하는 데 사용됩니다.
x-prodsmart-api-version - 웹후크를 보내는 데 사용되는 API의 버전입니다.
x-prodsmart-webhook-uuid - 고유한 웹후크 식별
x-prodsmart-triggered-at - 웹후크가 트리거된 시간
웹후크를 확인하는 방법
200 상태 코드로 응답하기 전에 웹후크가 Prodsmart에서 생성되었는지 확인하는 것이 중요합니다. 서명을 계산하여 이 확인을 수행합니다.
모든 웹후크 요청에는 base64 형식으로 인코딩된 x-prodsmart-hmac-sha1이라는 특정 헤더가 함께 제공됩니다. 이 헤더는 API 암호 및 웹후크 요청에 포함된 데이터를 사용하여 생성됩니다.
웹후크의 인증을 확인하려면 동일한 API 암호 및 제공된 데이터를 사용하여 직접 서명을 계산해야 합니다.
계산된 서명이 있으면 들어오는 웹후크 요청의 x-prodsmart-hmac-sha1 헤더에 있는 값과 비교합니다.
계산된 서명이 x-prodsmart-hmac-sha1 헤더의 값과 일치하는 경우 웹후크가 Prodsmart에서 전송되었으며 200 상태 코드를 사용하여 계속 응답할 수 있다는 점을 확신할 수 있습니다.
생산 주문
요청(응용프로그램/json)
방법: POST
바디
{ "products": [ { "product": "V23076", "quantity-ordered": 3500, "observations": "", "quantity-produced": 700 } ], "code": "Test Production Order", "shipping": { "code": "shipping 45" }, "serial-number": "", "description": "", "start-date": "2023-04-20T09:15:15Z", "due-date": "2023-05-16T17:15:15Z", "workers-assigned": [ { "number": 120 }, { "number": 11 }, { "number": 10 }, { "number": 1 } ], "ended": false, "machines": [ { "code": "A32" }, { "code": "F1" } ], "pieces-by-box": 20, "status": "onschedule", "running-status": "started", "notes": "", "id": 1}
노트: 생산 주문이 삭제되면 실행 상태가 삭제됩니다.
타임 리코더
요청(응용프로그램/json)
방법: POST
바디
{ "id": 932015, "date": "2022-05-19T14:35:30.000+01:00", "notification": "punchClock_created", "worker": { "number": 0 }, "entry": 1}
가능한 값 입력:
1 - 인
0 - 아웃
알림 가능한 값:
punchClock_created
punchClock_updated
punchClock_deleted
배송 재고 이동
배송 재고 이동 작성/업데이트
요청(응용프로그램/json)
방법: POST
바디
[{ "product": { "id": 222, "code": "product-code", "uom": "uom" }, "lot": { "code": "lot-code", "expiration-date": "lot-expiration-date", "supplier-lot": "supplier-lot-name" }, "date": "2022-02-21T00:00:00Z", "quantity": 10.0, "stock-type": "out", "comment": "comment", "warehouse-location": { "id": 333, "code": "warehouse-location-code", "warehouse": { "id": 444, "code": "warehouse-code" } }, "sales-order": { "id": 555, "code": "sales-order-code", "client": { "id": 777, "code": "client-code" }, "parameters": [{ "name": "parameterX", "value": "valueX" }] }, "shipping": { "id": 666, "code": "shipping-code" }, "worker": { "id": 333, "number": 0, "name": "worker-name" }}]
알림 가능한 값:
shipping_inventory_movement_created
shipping_inventory_movement_updated
배송 재고 이동이 삭제됨
요청(응용프로그램/json)
방법: POST
바디
{ "id": 111}
알림 가능한 값:
shipping_inventory_movement_deleted
재고 이동 수신
작성/업데이트된 재고 이동 수신
요청(응용프로그램/json)
방법: POST
바디
[{ "product": { "id": 222, "code": "product-code", "uom": "uom" }, "lot": { "code": "lot-code", "expiration-date": "lot-expiration-date", "supplier-lot": "supplier-lot-name" }, "date": "2022-02-21T00:00:00Z", "quantity": 10.0, "stock-type": "in", "comment": "comment", "warehouse-location": { "id": 333, "code": "warehouse-location-code", "warehouse": { "id": 444, "code": "warehouse-code" } }, "purchase-order": { "id": 555, "code": "purchase-order-code", "supplier": "supplier-code", "parameters": [{ "name": "parameterX", "value": "valueX" }] }, "receiving": { "id": 666, "code": "receiving-code" }, "worker": { "id": 333, "number": 0, "name": "worker-name" }}]
알림 가능한 값:
receiving_inventory_movement_created
receiving_inventory_movement_updated
재고 이동 수신 삭제됨
요청(응용프로그램/json)
방법: POST
바디
{ "id": 111}
알림 가능한 값:
receiving_inventory_movement_deleted
내부 재고 이동
내부 재고 이동 작성/업데이트
요청(응용프로그램/json)
방법: POST
바디
[{ "product": { "id": 222, "code": "product-code", "uom": "uom" }, "lot": { "code": "lot-code", "expiration-date": "lot-expiration-date", "supplier-lot": "supplier-lot-name" }, "date": "2022-02-21T00:00:00Z", "quantity": 10.0, "stock-type": "in", "comment": "comment", "warehouse-location": { "id": 333, "code": "warehouse-location-code", "warehouse": { "id": 444, "code": "warehouse-code" } }, "worker": { "id": 333, "number": 0, "name": "worker-name" }}]
알림 가능한 값:
internal_inventory_movement_created
internal_inventory_movement_updated
내부 재고 이동이 삭제됨
요청(응용프로그램/json)
방법: POST
바디
{ "id": 111}
알림 가능한 값:
internal_inventory_movement_deleted
자재 준비 이동
자재 준비가 작성/업데이트됨
요청(응용프로그램/json)
방법: POST
바디
[{ "product": { "id": 222, "code": "product-code", "uom": "uom" }, "production-order": { "id": 333, "code": "production-order-code" }, "lot": { "code": "lot-code", "expiration-date": "lot-expiration-date", "supplier-lot": "supplier-lot-name" }, "date": "2022-02-21T00:00:00Z", "quantity": 10.0, "warehouse-location": { "id": 333, "code": "warehouse-location-code", "warehouse": { "id": 444, "code": "warehouse-code" } }, "worker": { "id": 333, "number": 0, "name": "worker-name" }}]
알림 가능한 값:
material_staging_created
material_staging_updated
자재 준비가 삭제됨
요청(응용프로그램/json)
방법: POST
바디
{ "id": 111}
알림 가능한 값:
material_staging_deleted
로트
로트 작성/업데이트
요청(응용프로그램/json)
방법: POST
바디
[{ "code": "lot-code", "creation-date": "2022-02-21T00:00:00Z", "expiration-date": "2022-02-21T00:00:00Z", "supplier-lot": "supplier-lot-name", "product": { "id": 222, "code": "product-code", "uom": "uom" }}]
알림 가능한 값:
lot_created
lot_updated
로트 삭제됨
요청(응용프로그램/json)
방법: POST
바디
{ "id": 111}
알림 가능한 값:
lot_deleted
비작동 시간
비작동 시간이 작성/업데이트됨/삭제됨
요청(응용프로그램/json)
방법: POST
바디
{ "id": 1, "start-time": "2000-01-01T00:00:00.000+01:00", "end-time": "2099-12-31T23:59:59.999+01:00", "started-by": {}, "closed-by": { "number": 0 }, "workers": [ { "number": 0 } ], "machines": [], "product": "", "production-order": "", "checked-out": true, "downtime-type": "downtime1 type", "time-spent": "08:00:00", "event-type": "downTime_created"}
알림 가능한 값:
downTime_created
downTime_updated
downTime_deleted
피드 채널 변경
어떠한 이유로든 웹후크를 사용할 수 없는 경우, Autodesk에서는 현재 지난 24시간 내에 발생한 변경 사항을 저장할 변경 사항 스택으로 또는 Autodesk에서 제공하는 웹 서비스를 통해 마지막으로 변경 사항을 요청한 이후 대안을 제공합니다. 이 기능을 사용하려면 통합 메뉴(https://app.prodsmart.com/admin/integrations)에서 채널을 작성하여야 합니다. 조직당 최대 3개의 채널을 작성할 수 있습니다.
다음과 같은 6가지 유형의 변경 채널이 있습니다.
DOWN_TIME
PRODUCT
PRODUCTION
PRODUCTION_ORDER
PUNCH_CLOCK
STOCK
변경 사항 가져오기
GET /api/changes/{channel}{?access_token}
이 서비스를 호출할 때 엔티티 작성/업데이트/삭제되었거나 상태가 변경되었기 때문에 변경된 엔티티 리스트를 받게 됩니다. 서비스 호출당 최대 25개의 엔티티의 현재 상태(가장 오래된 변경 사항부터 최신 변경 사항 순)가 포함된 배열을 받게 됩니다. 서비스에서 가져온 엔티티는 새 업데이트가 생길 때까지 스택에서 제거됩니다. 변경 사항이 없으면 서비스가 빈 배열("[]")을 반환합니다.
예 URI
GET /api/changes/channel?access_token=
URI 매개변수
URI 매개변수
채널
문자열(필수)
액세스할 채널
access_token
문자열(필수)
Prodsmart API 액세스 토큰
작업자
부울(선택 사항)
생산 주문 채널 응답에 작업자 리스트 표시
요청
요청
Content-Type: application/json
비작동 시간
[ { "id": 1435048, "start-time": "2022-04-22T14:47:00.000+01:00", "end-time": "2022-04-23T00:00:00.000+01:00", "started-by": {}, "closed-by": { "number": 1 }, "workers": [ { "number": 1 } ], "machines": [], "product": "", "production-order": "", "checked-out": true, "downtime-type": "Maintenance", "time-spent": "09:13:00", "event-type": "downTime_deleted", }]
노트: 이벤트 유형 필드는 비작동 시간이 삭제된 경우에만 표시됩니다.
생산 주문
[ { "products": [ { "product": "RN2", "quantity-ordered": 30.0, "observations": "", "quantity-produced": 0.0 } ], "code": "Production Order 123", "description": "", "shipping": {}, "start-date": "2022-04-21T00:00:00.000+01:00", "due-date": "2022-04-28T00:00:00.000+01:00", "ended": false, "machines": [], "notes": "", "is-active": true, "running-status": "notstarted", "status": "onschedule", "material-staging-complete": false, "id": 1379919 }]
노트: 생산 주문이 삭제되면 실행 상태 필드의 값이 삭제됩니다.
제품
[ { "code": "V23076", "name": "V23076", "observations": "", "section": null, "unit-cost": null, "unit-price": null, "families": [], "operations": [], "components": [], "custom-fields": [], "notification": null, "serializable": null, "shipping-package-types": [], "external-stock": null, "stock-max": null, "min-quantity-reorder": null, "quantity-multiple": null, "scrap-allowance": null, "shelf-life": null, "parameters": [] }]
노트: 알림 필드에 product_deleted 값이 있으며 제품이 삭제됩니다.
생산 기록 ¶
[ { "production-order": { "code": "P1 - Week 14", "id": 3641 }, "operation": { "code": "CUT3", "product": "P1" }, "worker": { "number": 6 }, "machine": { "code": "WJC" }, "quantity": 0.0, "checked-out": false, "produced-waste": [], "consumptions": [], "total-time-factor": 1.0, "rework": false, "work-time": "00H00m00s", "start-time": "2022-04-22T14:43:00.000+01:00", "end-time": "2022-04-22T14:43:00.000+01:00", "status": "deleted", "show-check-in-checklist-and-c-f": false, "id": 12952533 }]
노트: 상태 필드는 생산 기록이 삭제된 경우에만 표시됩니다.
타임 리코더
[ { "id": 932015, "date": "2022-05-19T14:35:30.000+01:00", "notification": "punchClock_deleted", "worker": { "number": 0 }, "entry": 1 }]
노트: 알림 필드는 타임 리코더 항목이 삭제된 경우에만 표시됩니다.
재고
[ { "product-code": "P1", "stock": 2395.0, "lot": [ { "code": "Lot 0086", "stock": 500.0 } ] }]
공급자
Prodsmart API의 공급자 리소스.
공급자
단일 공급자 객체입니다.
공급자 리소스에는 다음과 같은 속성이 있습니다.
ID(제공됨)
코드(문자열, 필수, 고유) - 공급자 코드
이름(문자열, 필수) - 공급자 이름
번호(문자열, 선택적) - 공급자 VAT 번호
만료 날짜(날짜, 선택 사항, 형식 YYYY-MM-DDTHH:MM:SSZ) - 공급자가 만료되는 날짜
주소(배열, 선택 사항)
코드(문자열, 필수, 고유) - 주소 코드
이름(문자열, 선택 사항) - 주소 이름
주소(문자열, 필수) - 주소 줄
구/군(문자열, 선택 사항) - 주소 구/군
우편 번호(문자열, 선택적) - 주소 우편 번호
시/도(문자열, 선택 사항) - 주소 시/도
국가(문자열, 필수) - 주소 국가 코드
기본값(부울, 선택 사항 - 기본값은 false) - true인 경우 공급자 기본 주소
연락처(배열, 선택 사항)
전화번호(문자열, 이메일이 없는 경우 필수) - 연락처 전화번호
이메일(전화번호가 없는 경우 필수) - 연락처 이메일
이름(문자열, 선택 사항) - 연락처 이름
기본값(부울, 선택 사항 - 기본값은 false) - true인 경우 공급자 기본 연락처
기본 주소/연락처 규칙:
연락처와 주소 모두 하나의 기본 연락처 또는 주소만 가질 수 있습니다.
공급자가 주소를 가지고 있는 경우 주소 중 하나가 기본 주소여야 합니다.
공급자에 연락처가 있는 경우 연락처 중 하나가 기본 연락처여야 합니다.
공급자를 작성/업데이트할 때 기본 연락처/주소가 없으면 첫 번째 연락처/주소가 기본 연락처/주소가 됩니다.
공급자 작성
POST /api/suppliers{?access_token}
상태: 사용 가능
공급자를 작성하려면 새 공급자에 대한 속성의 JSON 해시를 제공합니다. 이 작업을 수행하려면 productions_write 범위가 있는 access_token이 필요합니다.
예 URI
POST /api/suppliers?access_token=
URI 매개변수
URI 매개변수
access_token
문자열(필수)
Prodsmart API 액세스 토큰
요청
요청
헤더
Content-Type: application/json
바디
{ "code": "Supplier", "name": "Supplier", "number": "213456", "expiration-date": "2020-01-01T00:00:00Z", "contacts": [ { "email": "supplier@supplier.com", "phone-number": "12345678", "name": "Contact1", "default": true }, { "email": "supplier2@supplier2.com", "phone-number": "123456789", "name": "Contact2", "default": false } ], "addresses": [ { "code": "Address1", "name": "Address1", "city": "Lisbon", "address": "Address 1 Street", "post-code": "111-111", "state": "Lisbon", "country": "PT", "default": true }, { "code": "Address2", "name": "Address2", "city": "San Francisco", "address": "Address 1 Street", "post-code": "111-111", "state": "California", "country": "US", "default": false } ] }
응답 201
응답 201
바디
{ "id": 987356123, "code": "Supplier", "name": "Supplier", "number": "213456", "expiration-date": "01/01/2020", "contacts": [ { "phone-number": "12345678", "email": "supplier@supplier.com", "name": "Contact1", "default": true }, { "phone-number": "123456789", "email": "supplier2@supplier2.com", "name": "Contact2", "default": false } ], "addresses": [ { "code": "Address1", "name": "Address1", "address": "Address 1 Street", "city": "Lisbon", "post-code": "111-111", "state": "Lisbon", "country": "PT", "default": true }, { "code": "Address2", "name": "Address2", "address": "Address 1 Street", "city": "San Francisco", "post-code": "111-111", "state": "California", "country": "US", "default": false } ] }
응답 400
응답 400
바디
If there's a problem with the request, the problem found will be reported on the Response Body
공급자 나열
GET /api/suppliers{?access_token}
공급자를 나열합니다. 이 작업을 수행하려면 productions_write 범위가 있는 access_token이 필요합니다. 이 서비스는 페이지에 추가되어 페이지당 25개의 공급자가 반환됩니다.
예 URI
GET /api/suppliers?access_token=
URI 매개변수
URI 매개변수
access_token
문자열(필수)
Prodsmart API 액세스 토큰
페이지
숫자(선택 사항)
결과 페이지 색인, 1부터 시작
id
숫자(선택 사항)
id로 필터링된 공급자 나열
코드
문자열(선택 사항)
코드별로 필터링된 공급자 나열
요청
요청
헤더
Content-Type: application/json
응답 200
응답 200
바디
[ { "id": 987356123, "code": "Supplier", "name": "Supplier", "number": "213456", "expiration-date": "01/01/2020", "contacts": [ { "phone-number": "12345678", "email": "supplier@supplier.com", "name": "Contact1", "default": true }, { "phone-number": "123456789", "email": "supplier2@supplier2.com", "name": "Contact2", "default": false } ], "addresses": [ { "code": "Address1", "name": "Address1", "address": "Address 1 Street", "city": "Lisbon", "post-code": "111-111", "state": "Lisbon", "country": "PT", "default": true }, { "code": "Address2", "name": "Address2", "address": "Address 1 Street", "city": "San Francisco", "post-code": "111-111", "state": "California", "country": "US", "default": false } ] }, { "id": 987356124, "code": "Supplier2", "name": "Supplier2", "number": "213457", "expiration-date": "01/01/2020", "contacts": [ { "phone-number": "12345678", "email": "supplier3@supplier3.com", "name": "Contact1", "default": true }, { "phone-number": "123456789", "email": "supplier4@supplier4.com", "name": "Contact2", "default": false } ], "addresses": [ { "code": "Address3", "name": "Address3", "address": "Address 3 Street", "city": "Paris", "post-code": "111-111", "state": "Paris", "country": "FR", "default": true }, { "code": "Address4", "name": "Address4", "address": "Address 4 Street", "city": "Madrid", "post-code": "111-111", "state": "Madrid", "country": "ES", "default": false } ] } ]
응답 400Show
응답 400Show
바디
If there's a problem with the request, the problem found will be reported on the Response Body
공급자 검색
GET /api/suppliers/{id}{?access_token}
이 작업을 수행하려면 productions_write 범위가 있는 access_token이 필요합니다.
예 URI
GET /api/suppliers/id?access_token=
URI 매개변수
URI 매개변수
access_token
문자열(필수)
Prodsmart API 액세스 토큰
id
숫자(필수)
공급자 ID
요청
요청
헤더
Content-Type: application/json
응답 201
응답 201
바디
{ "id": 987356123, "code": "Supplier", "name": "Supplier", "number": "213456", "expiration-date": "01/01/2020", "contacts": [ { "phone-number": "12345678", "email": "supplier@supplier.com", "name": "Contact1", "default": true }, { "phone-number": "123456789", "email": "supplier2@supplier2.com", "name": "Contact2", "default": false } ], "addresses": [ { "code": "Address1", "name": "Address1", "address": "Address 1 Street", "city": "Lisbon", "post-code": "111-111", "state": "Lisbon", "country": "PT", "default": true }, { "code": "Address2", "name": "Address2", "address": "Address 1 Street", "city": "San Francisco", "post-code": "111-111", "state": "California", "country": "US", "default": false } ] }
응답 400
응답 400
바디
If there's a problem with the request, the problem found will be reported on the Response Body
공급자 업데이트
PUT /api/suppliers/{id}{?access_token}
공급자를 업데이트하려면 새 공급자에 대한 속성의 JSON 해시를 제공합니다.
접촉
지정된 공급자 연락처가 현재 연락처를 대체합니다.
기존 연락처와 이름이 같은 연락처를 제공하는 경우 해당 이름을 가진 연락처의 값이 지정된 값으로 대체됩니다.
연락처가 제공되지 않으면 기존 연락처가 제거됩니다.
주소
지정된 주소가 현재 주소를 대체합니다.
기존 주소와 동일한 코드를 가진 주소를 지정하면 해당 코드가 있는 주소의 값이 지정된 값으로 대체됩니다.
주소가 없으면 기존 주소가 제거됩니다.
주소에 연관된 엔티티가 있는 경우 주소를 제거할 수 없으므로 요청이 실패합니다.
이 작업을 수행하려면 productions_write 범위가 있는 access_token이 필요합니다.
예 URI
PUT /api/suppliers/id?access_token=
URI 매개변수
URI 매개변수
id
숫자(필수)
클라이언트 ID
access_token
문자열(필수)
Prodsmart API 액세스 토큰
요청
요청
헤더
Content-Type: application/json
바디
{ "code": "Supplier", "name": "Supplier", "number": "213456", "expiration-date": "2020-01-01T00:00:00Z", "contacts": [ { "phone-number": "12345678", "email": "supplier@supplier.com", "name": "Contact1", "default": true }, { "phone-number": "123456789", "email": "supplier2@supplier2.com", "name": "Contact2", "default": false } ], "addresses": [ { "code": "Address1", "name": "Address1", "address": "Address 1 Street", "city": "Lisbon", "post-code": "111-111", "state": "Lisbon", "country": "PT", "default": true }, { "code": "Address2", "name": "Address2", "address": "Address 1 Street", "city": "San Francisco", "post-code": "111-111", "state": "California", "country": "US", "default": false } ] }
응답 201
응답 201
바디
{ "code": "Supplier", "name": "Supplier", "number": "213456", "expiration-date": "01/01/2020", "contacts": [ { "phone-number": "12345678", "email": "supplier@supplier.com", "name": "Contact1", "default": true }, { "phone-number": "123456789", "email": "supplier2@supplier2.com", "name": "Contact2", "default": false } ], "addresses": [ { "code": "Address1", "name": "Address1", "address": "Address 1 Street", "city": "Lisbon", "post-code": "111-111", "state": "Lisbon", "country": "PT", "default": true }, { "code": "Address2", "name": "Address2", "address": "Address 1 Street", "city": "San Francisco", "post-code": "111-111", "state": "California", "country": "US", "default": false } ] }
응답 400
응답 400
바디
If there's a problem with the request, the problem found will be reported on the Response Body
공급자 제거
DELETE /api/suppliers/{id}{?access_token}
예 URI
DELETE /api/suppliers/id?access_token=
URI 매개변수
URI 매개변수
id
숫자(필수)
공급자 ID.
access_token
문자열(필수)
Prodsmart API 액세스 토큰
요청
요청
헤더
Content-Type: application/json
응답 204
응답 204
바디
Supplier was deleted
응답 412
응답 412
바디
It's not possible to delete this supplier. It has dependent entities.
클라이언트
Prodsmart API의 클라이언트 리소스.
클라이언트
단일 클라이언트 객체.
클라이언트 리소스에는 다음과 같은 속성이 있습니다.
ID(제공됨)
코드(문자열, 필수, 고유) - 클라이언트 코드
이름(문자열, 필수) - 클라이언트 이름
번호(문자열, 선택 사항) - 클라이언트 번호
전화번호(문자열, 선택 사항) - 클라이언트 전화번호
이메일(문자열, 선택 사항) - 클라이언트 이메일
주소(배열, 선택 사항)
코드(문자열, 필수, 고유) - 주소 코드
이름(문자열, 선택 사항) - 주소 이름
주소(문자열, 필수) - 주소 줄
구/군(문자열, 선택 사항) - 주소 구/군
우편 번호(문자열, 선택적) - 주소 우편 번호
시/도(문자열, 선택 사항) - 주소 시/도
국가(문자열, 필수) - 주소 국가 코드
기본값(부울, 선택 사항 - 기본값은 false) - true인 경우 클라이언트 기본 주소
연락처(배열, 선택 사항)
전화번호(문자열, 이메일이 없는 경우 필수) - 연락처 전화번호
이메일(전화번호가 없는 경우 필수) - 연락처 이메일
이름(문자열, 선택 사항) - 연락처 이름
기본값(부울, 선택 사항 - 기본값은 false) - true인 경우 클라이언트 기본 연락처
기본 주소/연락처 규칙:
연락처와 주소 모두 하나의 기본 연락처 또는 주소만 가질 수 있습니다.
클라이언트에 주소가 있는 경우 주소 중 하나가 기본 주소여야 합니다.
클라이언트에게 연락처가 있는 경우 연락처 중 하나가 기본 연락처여야 합니다.
클라이언트를 작성/업데이트할 때 기본 연락처/주소가 없으면 첫 번째 연락처/주소가 기본 연락처/주소가 됩니다.
클라이언트 작성
POST /api/clients{?access_token}
클라이언트를 작성하려면 새 클라이언트에 대한 속성의 JSON 해시를 제공합니다. 이 작업을 수행하려면 productions_write 범위가 있는 access_token이 필요합니다. 지금은 클라이언트 하나만 저장할 수 있습니다. 나중에 요청이 하나의 리소스가 아닌 배열인 경우 배열의 모든 항목이 저장됩니다.
예 URI
POST /api/clients?access_token=
URI 매개변수
URI 매개변수
access_token
문자열(필수)
Prodsmart API 액세스 토큰
요청
요청
헤더
Content-Type: application/json
바디
{ "code": "Supplier", "name": "Supplier", "number": "213456", "expiration-date": "2020-01-01T00:00:00Z", "contacts": [ { "email": "supplier@supplier.com", "phone-number": "12345678", "name": "Contact1", "default": true }, { "email": "supplier2@supplier2.com", "phone-number": "123456789", "name": "Contact2", "default": false } ], "addresses": [ { "code": "Address1", "name": "Address1", "city": "Lisbon", "address": "Address 1 Street", "post-code": "111-111", "state": "Lisbon", "country": "PT", "default": true }, { "code": "Address2", "name": "Address2", "city": "San Francisco", "address": "Address 1 Street", "post-code": "111-111", "state": "California", "country": "US", "default": false } ] }
응답 201
응답 201
바디
{ "id": 987356123, "code": "Supplier", "name": "Supplier", "number": "213456", "expiration-date": "01/01/2020", "contacts": [ { "phone-number": "12345678", "email": "supplier@supplier.com", "name": "Contact1", "default": true }, { "phone-number": "123456789", "email": "supplier2@supplier2.com", "name": "Contact2", "default": false } ], "addresses": [ { "code": "Address1", "name": "Address1", "address": "Address 1 Street", "city": "Lisbon", "post-code": "111-111", "state": "Lisbon", "country": "PT", "default": true }, { "code": "Address2", "name": "Address2", "address": "Address 1 Street", "city": "San Francisco", "post-code": "111-111", "state": "California", "country": "US", "default": false } ] }
응답 400
응답 400
바디
If there's a problem with the request, the problem found will be reported on the Response Body
클라이언트 나열
GET /api/clients{?access_token}
클라이언트를 나열합니다. 이 작업을 수행하려면 productions_write 범위가 있는 access_token이 필요합니다. 이 서비스는 페이지에 매겨져 페이지당 25개의 클라이언트를 반환합니다.
예 URI
GET /api/clients?access_token=
URI 매개변수
URI 매개변수
access_token
문자열(필수)
Prodsmart API 액세스 토큰
페이지
숫자(선택 사항)
결과 페이지 색인, 1부터 시작
id
숫자(선택 사항)
id로 필터링된 클라이언트 나열
코드
문자열(선택 사항)
코드별로 필터링된 클라이언트 나열
요청
요청
헤더
Content-Type: application/json
응답 200
응답 200
바디
[ { "id": 987356123, "code": "Supplier", "name": "Supplier", "number": "213456", "expiration-date": "01/01/2020", "contacts": [ { "phone-number": "12345678", "email": "supplier@supplier.com", "name": "Contact1", "default": true }, { "phone-number": "123456789", "email": "supplier2@supplier2.com", "name": "Contact2", "default": false } ], "addresses": [ { "code": "Address1", "name": "Address1", "address": "Address 1 Street", "city": "Lisbon", "post-code": "111-111", "state": "Lisbon", "country": "PT", "default": true }, { "code": "Address2", "name": "Address2", "address": "Address 1 Street", "city": "San Francisco", "post-code": "111-111", "state": "California", "country": "US", "default": false } ] }, { "id": 987356124, "code": "Supplier2", "name": "Supplier2", "number": "213457", "expiration-date": "01/01/2020", "contacts": [ { "phone-number": "12345678", "email": "supplier3@supplier3.com", "name": "Contact1", "default": true }, { "phone-number": "123456789", "email": "supplier4@supplier4.com", "name": "Contact2", "default": false } ], "addresses": [ { "code": "Address3", "name": "Address3", "address": "Address 3 Street", "city": "Paris", "post-code": "111-111", "state": "Paris", "country": "FR", "default": true }, { "code": "Address4", "name": "Address4", "address": "Address 4 Street", "city": "Madrid", "post-code": "111-111", "state": "Madrid", "country": "ES", "default": false } ] } ]
응답 400
응답 400
바디
If there's a problem with the request, the problem found will be reported on the Response Body
클라이언트 검색
GET /api/clients/{id}{?access_token}
이 작업을 수행하려면 productions_write 범위가 있는 access_token이 필요합니다.
예 URI
GET /api/clients/id?access_token=
URI 매개변수
URI 매개변수
access_token
문자열(필수)
Prodsmart API 액세스 토큰
id
숫자(필수)
클라이언트 ID
요청
요청
헤더
Content-Type: application/json
응답 201
응답 201
바디
{ "id": 987356123, "code": "Supplier", "name": "Supplier", "number": "213456", "expiration-date": "01/01/2020", "contacts": [ { "phone-number": "12345678", "email": "supplier@supplier.com", "name": "Contact1", "default": true }, { "phone-number": "123456789", "email": "supplier2@supplier2.com", "name": "Contact2", "default": false } ], "addresses": [ { "code": "Address1", "name": "Address1", "address": "Address 1 Street", "city": "Lisbon", "post-code": "111-111", "state": "Lisbon", "country": "PT", "default": true }, { "code": "Address2", "name": "Address2", "address": "Address 1 Street", "city": "San Francisco", "post-code": "111-111", "state": "California", "country": "US", "default": false } ] }
응답 400
응답 400
바디
If there's a problem with the request, the problem found will be reported on the Response Body
클라이언트 업데이트
PUT /api/clients/{id}{?access_token}
클라이언트를 업데이트하려면 새 클라이언트에 대한 속성의 JSON 해시를 제공합니다.
접촉
지정된 공급자 연락처가 현재 연락처를 대체합니다.
기존 연락처와 이름이 같은 연락처를 제공하는 경우 해당 이름을 가진 연락처의 값이 지정된 값으로 대체됩니다.
연락처가 제공되지 않으면 기존 연락처가 제거됩니다.
주소
지정된 주소가 현재 주소를 대체합니다.
기존 주소와 동일한 코드를 가진 주소를 지정하면 해당 코드가 있는 주소의 값이 지정된 값으로 대체됩니다.
주소가 없으면 기존 주소가 제거됩니다.
주소에 연관된 엔티티가 있는 경우 주소를 제거할 수 없으므로 요청이 실패합니다.
이 작업을 수행하려면 productions_write 범위가 있는 access_token이 필요합니다.
예 URI
PUT /api/clients/id?access_token=
URI 매개변수
URI 매개변수
id
숫자(필수)
클라이언트 ID
access_token
문자열(필수)
Prodsmart API 액세스 토큰
요청
요청
헤더
Content-Type: application/json
바디
{ "code": "Supplier", "name": "Supplier", "number": "213456", "expiration-date": "2020-01-01T00:00:00Z", "contacts": [ { "phone-number": "12345678", "email": "supplier@supplier.com", "name": "Contact1", "default": true }, { "phone-number": "123456789", "email": "supplier2@supplier2.com", "name": "Contact2", "default": false } ], "addresses":[ { "code": "Address1", "name": "Address1", "address": "Address 1 Street", "city": "Lisbon", "post-code": "111-111", "state": "Lisbon", "country": "PT", "default": true }, { "code": "Address2", "name": "Address2", "address": "Address 1 Street", "city": "San Francisco", "post-code": "111-111", "state": "California", "country": "US", "default": false } ]}
응답 201
응답 201
바디
{ "code": "Supplier", "name": "Supplier", "number": "213456", "expiration-date": "01/01/2020", "contacts": [ { "phone-number": "12345678", "email": "supplier@supplier.com", "name": "Contact1", "default": true }, { "phone-number": "123456789", "email": "supplier2@supplier2.com", "name": "Contact2", "default": false } ], "addresses": [ { "code": "Address1", "name": "Address1", "address": "Address 1 Street", "city": "Lisbon", "post-code": "111-111", "state": "Lisbon", "country": "PT", "default": true }, { "code": "Address2", "name": "Address2", "address": "Address 1 Street", "city": "San Francisco", "post-code": "111-111", "state": "California", "country": "US", "default": false } ] }
응답 400
응답 400
바디
If there's a problem with the request, the problem found will be reported on the Response Body
클라이언트 제거
DELETE /api/clients/{id}{?access_token}
예 URI
DELETE /api/clients/id?access_token=
URI 매개변수
URI 매개변수
id
숫자(필수)
클라이언트 ID.
access_token
문자열(필수)
Prodsmart API 액세스 토큰
요청
요청
헤더
Content-Type: application/json
응답 204
응답 204
바디
Client was deleted
응답 412
응답 412
바디
It's not possible to delete this client. It has dependent entities.
판매 주문
Prodsmart API의 클라이언트 주문 리소스.
판매 주문
단일 판매 주문 객체. 판매 주문 리소스는 Prodsmart API의 가장 중요한 리소스 중 하나입니다.
판매 주문 리소스에는 다음과 같은 속성이 있습니다.
ID(제공됨)
코드(문자열, 필수) - 판매 주문 코드
클라이언트(문자열, 선택 사항) - 클라이언트 코드
관찰(문자열, 선택 사항) - 판매 주문 관찰
제품(배열, 필수, 비어 있지 않음)
코드(문자열, 필수, 고유) - 제품 코드
수량(이중, 필수, >0) - 주문한 수량
기한일(날짜, 선택 사항, 형식 YYYY-MM-DDTHH:MM:SSZ) - 배송이 만기되는 날짜
requested-date (date, optional, format YYYY-MM-DDTHH:MM:SSZ) - 배송이 요청되는 날짜
위치(문자열, 선택 사항) - 여러 현장인 경우 위치
가격(이중, 선택 사항) - 제품 가격
매개변수(문자열, 선택 사항) - 판매 주문 관련 속성을 포함합니다.
판매 주문 작성
POST /api/client-order/{?access_token}
판매 주문을 작성하려면 새 판매 주문에 대한 속성의 JSON 해시를 제공합니다. 이 작업을 수행하려면 productions_write 범위가 있는 access_token이 필요합니다. 지금은 판매 주문 하나만 저장할 수 있습니다. 나중에 요청이 하나의 리소스가 아닌 배열인 경우 배열의 모든 항목이 저장됩니다.
예 URI
POST /api/client-order/?access_token=
URI 매개변수
URI 매개변수
access_token
문자열(필수)
Prodsmart API 액세스 토큰
요청
요청
헤더
Content-Type: application/json
바디
{ "code": "CO123 - Week 47", "creation-date": "2022-04-19T08:30:01Z", "client": "Client X", "observations": "Ready next week", "billing-address": "San Francisco", "delivery-address": "Delivery address code", "location": "location code", "products": [ { "code": "V23076", "quantity": 100, "due-date": "2019-08-16T17:15:15Z", "requested-date": "2019-01-16T15:19:54Z", "price": 200.3, "delivery-address":"San Francisco" }, { "code": "V23077", "quantity": 99, "due-date": "2016-08-16T17:15:15Z", "requested-date": "2019-01-16T15:19:54Z", "price":502, "delivery-address":"Los Angeles" } ], "parameters": [ { "name": "Sales Order Type", "value": "Regular" } ]}
응답 201
응답 201
바디
{ "id": 987356123, "code": "CO123 - Week 47", "creation-date": "2022-04-19T08:30:01Z", "client": "Client X", "billing-address":"San Francisco", "observations": "Ready next week", "products": [ { "code": "V23076", "quantity": 100, "due-date": "2019-08-16T17:15:15Z", "requested-date": "2019-01-16T15:19:54Z", "price": 200.3, "delivery-address":"San Francisco" }, { "code": "V23077", "quantity": 99, "due-date": "2016-08-16T17:15:15Z", "requested-date": "2019-01-16T15:19:54Z", "price":502, "delivery-address":"Los Angeles" } ], "parameters": [ { "name": "Sales Order Type", "value": "Regular" } ]}
응답 400
응답 400
바디
If there's a problem with the request, the problem found will be reported on the Response Body
판매 주문 나열
GET /api/client-order/{?access_token}
판매 주문을 나열합니다. 여러 매개변수는 AND 조건으로 처리됩니다. 이 작업을 수행하려면 productions_write 범위가 있는 access_token이 필요합니다. 이 서비스는 페이지에 매겨져 페이지당 25개의 판매 주문을 반환합니다.
예 URI
GET /api/client-order/?access_token=
URI 매개변수
URI 매개변수
access_token
문자열(필수)
Prodsmart API 액세스 토큰
페이지
숫자(선택 사항)
결과 페이지 색인, 1부터 시작
due-date-before
날짜(선택 사항)
다음 날짜 이전의 기한일이 있는 판매 주문 나열
due-date-after
날짜(선택 사항)
다음 날짜 이후의 기한일이 있는 판매 주문 나열
클라이언트
문자열(선택 사항)
기계 코드
요청
요청
헤더
Content-Type: application/json
응답 200
응답 200
바디
[ { "id": 987356123, "code": "CO123 - Week 47", "creation-date": "2022-04-19T08:30:01Z", "client": "Client X", "observations": "Ready next week", "products": [ { "code": "V23076", "name": "Vessel", "quantity": 100, "due-date": "2019-08-16T17:15:15Z", "requested-date": "2019-01-16T15:19:54Z", "price": 200.3 }, { "code": "V23077", "quantity": 99, "due-date": "2016-08-16T17:15:15Z", "requested-date": "2019-01-16T15:19:54Z" } ], "parameters": [ { "name": "Sales Order Type", "value": "Regular" } ] }, { "id": 987356124, "code": "CO123 - Week 48", "client": "Client X", "observations": "", "products": [ { "code": "V23076", "name": "Vessel", "quantity": 70, "due-date": "2019-08-23T18:00:00Z", "requested-date": "2019-01-16T15:19:54Z", "price": 140 }, { "code": "V23077", "quantity": 69, "due-date": "2016-08-23T18:00:00Z", "requested-date": "2019-01-16T15:19:54Z" } ], "parameters": [ { "name": "Sales Order Type", "value": "Priority" } ] }]
응답 400
응답 400
바디
If there's a problem with the request, the problem found will be reported on the Response Body
판매 주문 검색
GET /api/client-order/{id}{?access_token}
이 작업을 수행하려면 productions_write 범위가 있는 access_token이 필요합니다.
예 URI
GET /api/client-order/id?access_token=
URI 매개변수
URI 매개변수
access_token
문자열(필수)
Prodsmart API 액세스 토큰
id
숫자(필수)
판매 주문 ID
요청
요청
헤더
Content-Type: application/json
응답 201
응답 201
바디
{ "id": 987356123, "code": "CO123 - Week 47", "creation-date": "2022-04-19T08:30:01Z", "client": "Client X", "observations": "Ready next week", "products": [ { "code": "V23076", "name": "Vessel", "quantity": 100, "due-date": "2019-08-16T17:15:15Z", "requested-date": "2019-01-16T15:19:54Z", "price": 200.3 }, { "code": "V23077", "quantity": 99, "due-date": "2016-08-16T17:15:15Z", "requested-date": "2019-01-16T15:19:54Z" } ], "parameters": [ { "name": "Sales Order Type", "value": "Priority" } ]}
응답 400
응답 400
바디
If there's a problem with the request, the problem found will be reported on the Response Body
판매 주문 업데이트
PUT /api/client-order/{?access_token}
판매 주문을 업데이트하려면 새 판매 주문에 대한 속성의 JSON 해시를 제공합니다. 이 작업을 수행하려면 productions_write 범위가 있는 access_token이 필요합니다.
예 URI
PUT /api/client-order/?access_token=
URI 매개변수
URI 매개변수
access_token
문자열(필수)
Prodsmart API 액세스 토큰
요청
요청
헤더
Content-Type: application/json
바디
{ "code": "CO123 - Week 47", "creation-date": "2022-04-19T08:30:01Z", "client": "Client X", "observations": "Ready next week", "billing-address": "San Francisco", "location": "location code", "products": [ { "code": "V23076", "quantity": 100, "due-date": "2019-08-16T17:15:15Z", "requested-date": "2019-01-16T15:19:54Z", "price": 200.3, "billing-address": "San Francisco" }, { "code": "V23077", "quantity": 99, "due-date": "2016-08-16T17:15:15Z", "requested-date": "2019-01-16T15:19:54Z", "billing-address": "Los Angeles" } ]}
응답 201
응답 201
바디
{ "id": 987356123, "code": "CO123 - Week 47", "creation-date": "2022-04-19T08:30:01Z", "client": "Client X", "billing-address": "San Francisco", "observations": "Ready next week", "products": [ { "code": "V23076", "name": "Vessel", "quantity": 100, "due-date": "2019-08-16T17:15:15Z", "requested-date": "2019-01-16T15:19:54Z", "price": 200.3, "billing-address": "San Francisco" }, { "code": "V23077", "quantity": 99, "due-date": "2016-08-16T17:15:15Z", "requested-date": "2019-01-16T15:19:54Z", "billing-address": "Los Angeles" } ]}
응답 400
응답 400
바디
If there's a problem with the request, the problem found will be reported on the Response Body
판매 주문 제거
DELETE /api/client-order/{id}{?access_token}
예 URI
DELETE /api/client-order/id?access_token=
URI 매개변수
URI 매개변수
id
숫자(필수)
판매 주문 ID.
access_token
문자열(필수)
Prodsmart API 액세스 토큰
요청
요청
헤더
Content-Type: application/json
응답 204
응답 204
바디
Client order was deleted
응답 409
응답 409
바디
Client order already has production orders created or other entities associated, cannot be removed.
구매 주문
Prodsmart API의 구매 주문 리소스
구매 주문
단일 구매 주문 객체. 구매 주문 리소스는 Prodsmart API의 가장 중요한 리소스 중 하나입니다.
구매 주문 자원에는 다음과 같은 속성이 있습니다.
ID(제공됨)
코드(문자열, 필수) - 구매 주문 코드
공급자(문자열, 선택 사항) - 공급자 코드
청구 주소(문자열, 선택 사항) - 청구 주소
관찰(문자열, 선택 사항) - 구매 주문 관찰
제품(배열, 필수, 비어 있지 않음)
코드(문자열, 필수, 고유) - 제품 코드
수량(이중, 필수, >0) - 수량 요청
기한일(날짜, 선택 사항, 형식 YYYY-MM-DDTHH:MM:SSZ) - 수신이 기한일 날짜
요청한 날짜(날짜, 선택 사항, 형식 YYYY-MM-DDTHH:MM:SSZ) - 수신을 요청한 날짜
비용(이중, 선택 사항) - 제품 비용
UOM(문자열, 선택 사항) - 제품 측정 유닛
배송 주소(문자열, 선택 사항) - 받는 배송 주소
매개변수(문자열, 선택사항) - 구매 주문 매개변수
승인 상태(문자열, 선택 사항) - 초안, 검토 중, 승인됨, 확인됨, 거부됨
구매 주문 작성
POST /api/purchase-orders/{?access_token}
구매 주문을 작성하려면 새 구매 주문에 대한 속성의 JSON 해시를 제공합니다. 이 작업을 수행하려면 productions_write 범위가 있는 access_token이 필요합니다. 현재로서는 하나의 구매 주문만 저장할 수 있습니다. 나중에 요청이 하나의 리소스가 아닌 배열인 경우 배열의 모든 항목이 저장됩니다.
예 URI
POST /api/purchase-orders/?access_token=
URI 매개변수
URI 매개변수
access_token
문자열(필수)
Prodsmart API 액세스 토큰
요청
요청
헤더
Content-Type: application/json
바디
{ "code": "PO123 - Week 47", "creation-date": "2022-04-19T08:30:01Z", "supplier": "Supplier X", "billing-address": "Lisbon", "observations": "Ready next week", "products": [ { "code": "V23076", "quantity": 100, "due-date": "2019-08-16T17:15:15Z", "requested-date": "2019-01-16T15:19:54Z", "uom": "Box", "cost": 200.3 }, { "code": "V23077", "quantity": 99, "due-date": "2023-08-16T17:15:15Z", "requested-date": "2019-01-16T15:19:54Z" } ], "approval-status": "draft", "active": true}
응답 201
응답 201
헤더
Content-Type: application/json
바디
{ "code": "PO123 - Week 47", "creation-date": "2022-04-19T08:30:01Z", "supplier": "Supplier X", "billing-address": "Lisbon", "observations": "Ready next week", "products": [ { "code": "V23076", "quantity": 100, "due-date": "2019-08-16T17:15:15Z", "requested-date": "2019-01-16T15:19:54Z", "uom": "Box", "cost": 200.3 }, { "code": "V23077", "quantity": 99, "due-date": "2023-08-16T17:15:15Z", "requested-date": "2019-01-16T15:19:54Z" } ], "approval-status": "draft", "active": true}
응답 400
응답 400
바디
If there's a problem with the request, the problem found will be reported on the Response Body
구매 주문 검색
GET /api/purchase-orders/{id}{?access_token}
이 작업을 수행하려면 productions_write 범위가 있는 access_token이 필요합니다.
예 URI
GET /api/purchase-orders/id?access_token=
URI 매개변수
URI 매개변수
access_token
문자열(필수)
Prodsmart API 액세스 토큰
id
숫자(필수)
구매 주문 ID
요청
요청
헤더
Content-Type: application/json
응답 201
응답 201
바디
{ "id": 987356123, "code": "PO123 - Week 47", "creation-date": "2022-04-19T08:30:01Z", "supplier": "Supplier X", "observations": "Ready next week", "products": [ { "code": "V23076", "name": "Vessel", "quantity": 100, "due-date": "2019-08-16T17:15:15Z", "requested-date": "2019-01-16T15:19:54Z", "cost": 200.3 }, { "code": "V23077", "quantity": 99, "due-date": "2023-08-16T17:15:15Z", "requested-date": "2019-01-16T15:19:54Z" } ]}
응답 400
응답 400
바디
If there's a problem with the request, the problem found will be reported on the Response Body
구매 주문 업데이트
PUT/api/purchase-orders/{id}{?access_token}
구매 주문을 업데이트하려면 새 구매 주문에 대한 속성의 JSON 해시를 제공합니다. 이 작업을 수행하려면 productions_write 범위가 있는 access_token이 필요합니다.
예 URI
PUT /api/purchase-orders/id?access_token=
URI 매개변수
URI 매개변수
access_token
문자열(필수)
Prodsmart API 액세스 토큰
id
숫자(필수)
구매 주문 ID
요청
요청
헤더
Content-Type: application/json
바디
{ "id": 987356123, "code": "CO123 - Week 47", "creation-date": "2022-04-19T08:30:01Z", "client": "Client X", "observations": "Ready next week", "products": [ { "code": "V23076", "name": "Vessel", "quantity": 100, "due-date": "2019-08-16T17:15:15Z", "requested-date": "2019-01-16T15:19:54Z", "price": 200.3 }, { "code": "V23077", "quantity": 99, "due-date": "2016-08-16T17:15:15Z", "requested-date": "2019-01-16T15:19:54Z" } ]}
응답 201
응답 201
바디
{ "id": 987356123, "code": "CO123 - Week 47", "creation-date": "2022-04-19T08:30:01Z", "client": "Client X", "observations": "Ready next week", "products": [ { "code": "V23076", "name": "Vessel", "quantity": 100, "due-date": "2019-08-16T17:15:15Z", "requested-date": "2019-01-16T15:19:54Z", "price": 200.3 }, { "code": "V23077", "quantity": 99, "due-date": "2016-08-16T17:15:15Z", "requested-date": "2019-01-16T15:19:54Z" } ]}
응답 400
응답 400
바디
If there's a problem with the request, the problem found will be reported on the Response Body
구매 주문 제거
DELETE /api/purchase-orders/{id}{?access_token}
예 URI
DELETE /api/purchase-orders/id?access_token=
URI 매개변수
URI 매개변수
id
숫자(필수)
구매 주문 ID.
access_token
문자열(필수)
Prodsmart API 액세스 토큰
요청
요청
헤더
Content-Type: application/json
응답 204
응답 204
바디
Purchase order was deleted
응답 409
응답 409
바디
Purchase order already has production orders created or other entities associated, cannot be removed.
구매 주문 나열
GET /api/purchase-orders{?access_token}
구매 주문을 나열합니다. 여러 매개변수는 AND 조건으로 처리됩니다. 이 작업을 수행하려면 productions_write 범위가 있는 access_token이 필요합니다. 이 서비스는 페이지에 매겨져 페이지당 25개의 판매 주문을 반환합니다.
예 URI
GET /api/purchase-orders?access_token=
URI 매개변수
URI 매개변수
access_token
문자열(필수)
Prodsmart API 액세스 토큰
페이지
숫자(선택 사항)
결과 페이지 색인, 1부터 시작
id
숫자(선택 사항)
구매 주문 id별로 필터링된 구매 주문 나열
코드
문자열(선택 사항)
구매 주문 코드별로 필터링된 구매 주문 나열
due-date-before
날짜(선택 사항)
다음 날짜 이전의 기한일이 있는 구매 주문 나열
due-date-after
날짜(선택 사항)
다음 날짜 이후의 기한일이 있는 구매 주문 나열
공급자
문자열(선택 사항)
공급자 코드별로 필터링된 구매 주문 나열
요청
요청
헤더
Content-Type: application/json
응답 200
응답 200
바디
[ { "id": 987356123, "code": "PO123 - Week 47", "creation-date": "2023-04-19T08:30:01Z", "supplier": "Supplier X", "observations": "Ready next week", "products": [ { "code": "V23076", "name": "Vessel", "quantity": 100, "due-date": "2023-08-16T17:15:15Z", "requested-date": "2023-01-16T15:19:54Z", "cost": 200.3 }, { "code": "V23077", "quantity": 99, "due-date": "2023-08-16T17:15:15Z", "requested-date": "2023-01-16T15:19:54Z" } ] }, { "id": 987356124, "code": "PO123 - Week 48", "supplier": "Supplier X", "observations": "", "products": [ { "code": "V23076", "name": "Vessel", "quantity": 70, "due-date": "2023-08-23T18:00:00Z", "requested-date": "2023-01-16T15:19:54Z", "cost": 140 }, { "code": "V23077", "quantity": 69, "due-date": "2023-08-23T18:00:00Z", "requested-date": "2023-01-16T15:19:54Z" } ] }]
응답 400
응답 400
바디
If there's a problem with the request, the problem found will be reported on the Response Body
생산 주문
Prodsmart API의 생산 주문 리소스.
생산 주문
단일 생산 주문 객체입니다. 생산 주문 리소스는 Prodsmart API의 가장 중요한 리소스 중 하나입니다. 정의된 작업자가 정해진 기간 동안 미리 결정된 수량의 제품을 생산하기 위한 관리 주문을 나타냅니다.
생산 주문 자원에는 다음과 같은 속성이 있습니다.
ID(제공됨)
코드(문자열, 필수) - 생산 주문 코드
시작일(날짜, 필수, 형식 YYYY-MM-DDTHH:MM:SSZ) - 이 생산 주문이 시작될 예정인 날짜
기한일(날짜, 필수, 형식 YYYY-MM-DDTHH:MM:SSZ) - 이 생산 주문이 만기되는 날짜
제품(배열, 필수, 비어 있지 않음) - 제품 및 수량 주문
제품(문자열, 필수, 고유) - 제품 코드
주문한 수량(정수, 필수, >0) - 주문 수량
관찰(선택 사항) - 이 제품에 대한 노트
생산량(정수, 공급량, >0) - 생산량
설명(선택 사항) - 이 생산 주문에 대한 설명
배송(선택 사항) - 이 주문의 배송 코드
작업자 할당(배열, 선택 사항) -
번호 - 작업자 번호
기계(배열, 선택 사항)
코드 - 기계 코드
일련 번호(선택 사항)
설명(선택 사항)
노트(선택 사항)
상태(제공됨) - 예정됨(시작일 전 및 완성도 = 0), 예정대로(종료일 전 및 완성도 < 100%), 지연됨(종료일 후 완성도 < 100%), 완료됨(완성도 >= 100%)
실행 상태(제공됨) - 시작되지 않음(생산 없음), 시작됨(생산 포함), 닫힘(수동으로 닫힘 또는 완료 시 닫힘), 보관됨(수동으로 보관됨)
상태 ID는 작성 시 Prodsmart API에 의해 할당됩니다.
생산 주문 검색
GET /api/production-orders/{id}{?access_token}
생산 주문을 검색하려면 생산 주문 ID로 GET 요청을 수행하면 됩니다. 이 작업을 수행하려면 productions_write 범위가 있는 access_token이 필요합니다.
예 URI
GET /api/production-orders/id?access_token=
URI 매개변수
URI 매개변수
id
숫자(필수)
생산 주문 ID.
access_token
문자열(필수)
Prodsmart API 액세스 토큰
작업자
부울(선택 사항)
응답에 작업자 리스트 표시
요청
요청
헤더
Content-Type: application/json
응답 200
응답 200
바디
{ "products": [ { "product": "V23076", "quantity-ordered": 3500, "observations": "", "quantity-produced": 700 } ], "code": "V23076 - Week 33/34", "shipping": { "code": "shipping 45" }, "start-date": "2023-04-20T09:15:15Z", "due-date": "2023-05-16T17:15:15Z", "description": "Woodworks Ltd.", "ended": false, "custom-fields": [ { "Order Type": "No changeover" } ], "machines": [ { "code": "A32" } ], "pieces-by-box": 20, "is-active": true, "status": "onschedule", "running-status": "started", "notes": "", "location": { "id": "location id", "code": "location code", "name": "location name" }, "material-staging-complete": true, "id": 3990}
생산 주문 업데이트/대체
PUT /api/production-orders/{id}{?access_token}
생산 주문을 업데이트하려면 생산 주문의 ID로 PUT 요청을 수행하면 됩니다. 이 작업을 수행하려면 productions_write 범위가 있는 access_token이 필요합니다.
예 URI
PUT /api/production-orders/id?access_token=
URI 매개변수
URI 매개변수
id
숫자(필수)
생산 주문 ID.
access_token
문자열(필수)
Prodsmart API 액세스 토큰
작업자
부울(선택 사항)
응답에 작업자 리스트 표시
요청
요청
헤더
Content-Type: application/json
바디
{ "products": [ { "product": "V23076", "quantity-ordered": 4000, "observations": "", "quantity-produced": 700 } ], "code": "V23076 - Week 33/34", "shipping": { "code": "shipping 45" }, "start-date": "2023-04-20T09:15:15Z", "due-date": "2023-05-16T17:15:15Z", "description": "Woodworks Ltd.", "ended": false, "custom-fields": [ { "Order Type": "No changeover" } ], "machines": [ { "code": "A32" } ], "pieces-by-box": 20, "is-active": true, "status": "onschedule", "running-status": "started", "notes": "", "location": "location code", "material-staging-complete": true, "id": 3990}
응답 200
응답 200
바디
{ "products": [ { "product": "V23076", "quantity-ordered": 4000, "observations": "", "quantity-produced": 700 } ], "code": "V23076 - Week 33/34", "shipping": { "code": "shipping 45" }, "start-date": "2023-04-20T09:15:15Z", "due-date": "2023-05-16T17:15:15Z", "description": "Woodworks Ltd.", "ended": false, "custom-fields": [ { "Order Type": "No changeover" } ], "machines": [ { "code": "A32" } ], "pieces-by-box": 20, "is-active": true, "status": "onschedule", "running-status": "started", "notes": "", "location": { "id": "location id", "code": "location code", "name": "location name" }, "material-staging-complete": true, "id": 3990}
생산 주문 제거
DELETE /api/production-orders/{id}{?access_token}
예 URI
DELETE /api/production-orders/id?access_token=
URI 매개변수
URI 매개변수
id
숫자(필수)
생산 주문 ID.
access_token
문자열(필수)
Prodsmart API 액세스 토큰
요청
요청
헤더
Content-Type: application/json
응답 204
응답 204
바디
Production order was deleted
생산 주문 작성
POST /api/production-orders/{?access_token}
생산 주문을 작성하려면 새 생산 주문에 대한 속성의 JSON 해시를 제공합니다. 이 작업을 수행하려면 productions_write 범위가 있는 access_token이 필요합니다. 현재로서는 하나의 생산 주문만 저장할 수 있습니다. 나중에 요청이 하나의 리소스가 아닌 배열인 경우 배열의 모든 항목이 저장됩니다.
예 URI
POST /api/production-orders/?access_token=
URI 매개변수
URI 매개변수
access_token
문자열(필수)
Prodsmart API 액세스 토큰
작업자
부울(선택 사항)
응답에 작업자 리스트 표시
요청
요청
헤더
Content-Type: application/json
바디
{ "products": [ { "product": "productExample", "quantity-ordered": 4500, "observations": "" } ], "code": "exampleCode", "shipping": "shippingExample", "serial-number": "", "description": "", "start-date": "2023-07-20T09:15:15Z", "due-date": "2023-08-16T17:15:15Z", "parameters": [ { "name": "Custom Field Name", "value": "123" }, { "name": "Custom Field Name 2", "value": "456" } ], "workers-assigned": [ { "number": 1 }, { "number": 3 } ], "worker-groups": [ { "name": "All" } ], "ended": false, "machines": [ { "code": "exampleMachine" }, { "code": "F1" } ], "pieces-by-box": 20, "notes": "", "location": "location code", "active": true}
응답 201
응답 201
바디
{ "products": [ { "product": "productExample", "quantity-ordered": 4500, "observations": "", "quantity-produced": 0 } ], "code": "exampleCode", "shipping": "shippingExample", "serial-number": "", "description": "", "start-date": "2023-07-20T09:15:15Z", "due-date": "2023-08-16T17:15:15Z", "workers-assigned": [ { "number": 1 }, { "number": 2 } { "number": 3 } { "number": 4 } ], "ended": false, "machines": [ {"code": "exampleMachine"}, {"code": "F1"} ], "pieces-by-box": 20, "status": "scheduled", "running-status": "notstarted", "notes": "", "location": { "id": "location id", "code": "location code", "name": "location name" }, "active": true, "id": 11110}
응답 400
응답 400
바디
If there's a problem with the request, the problem found will be reported on the Response Body
생산 주문 나열
GET /api/production-orders/{?access_token}
생산 주문을 나열하려면 여러 매개변수는 AND 조건으로 처리됩니다. 이 작업을 수행하려면 productions_write 범위가 있는 access_token이 필요합니다. 이 서비스는 페이지에 매겨져 있으며 페이지당 25개의 OP를 반환합니다.
예 URI
GET /api/production-orders/?access_token=
URI 매개변수
URI 매개변수
access_token
문자열(필수)
Prodsmart API 액세스 토큰
페이지
숫자(선택 사항)
결과 페이지 색인, 1부터 시작
start-date-before
날짜(선택 사항)
이 날짜 이전의 시작일로 생산 주문 나열
start-date-after
날짜(선택 사항)
다음 이후의 시작일을 사용하여 생산 주문 나열
due-date-before
날짜(선택 사항)
다음 날짜 이전의 기한일이 있는 생산 주문 나열
due-date-after
날짜(선택 사항)
다음 날짜 이후의 기한일이 있는 생산 주문 나열
실행 상태
문자열(선택 사항)
시작되지 않음, 시작됨, 닫힘, 보관됨
활성
부울(선택 사항)
활성(true) 또는 비활성(false) 생산 주문만 나열
product
문자열(선택 사항)
제품 코드
기계
문자열(선택 사항)
기계 코드
작업자
부울(선택 사항)
응답에 작업자 리스트 표시
요청
요청
헤더
Content-Type: application/json
응답 200
응답 200
바디
[ { "products": [ { "product": "exampleProduct", "quantity-ordered": 4500, "observations": "", "quantity-produced": 0 } ], "code": "exampleCode", "shipping": "Shipping 45", "serial-number": "", "description": "", "start-date": "2023-07-20T09:15:15Z", "due-date": "2023-08-16T17:15:15Z", "workers-assigned": [ { "number": 10 }, { "number": 1 } ], "ended": false, "machines": [ { "code": "exampleMachine" }, { "code": "F1" } ], "pieces-by-box": 20, "status": "scheduled", "running-status": "notstarted", "notes": "", "location": { "id": "location id", "code": "location code", "name": "location name" }, "active": true, "id": 8763990 }]
생산 주문 문제 알림
POST /api/production-orders/{id}/notify{?access_token}
피드에 간단한 메시지를 게시하고 생산 주문에 메시지를 추가하는 서비스입니다.
짧은 메시지(문자열, 필수) - 피드에 게시된 메시지, 최대 길이 140자
메시지(문자열, 선택 사항) - PO의 노트 섹션에 메시지가 추가되었습니다.
예 URI
POST /api/production-orders/id/notify?access_token=
URI 매개변수
URI 매개변수
id
숫자(필수)
생산 주문 ID.
access_token
문자열(필수)
Prodsmart API 액세스 토큰
요청
요청
헤더
Content-Type: application/json
바디
{ "short-message": "example", "message": "complete message "}
응답 200
응답 200
생산 주문 활성화
POST /api/production-orders/{id}/activate{?access_token}
생산 주문을 활성화하는 서비스입니다.
예 URI
POST /api/production-orders/id/activate?access_token=
URI 매개변수
URI 매개변수
id
숫자(필수)
생산 주문 ID.
access_token
문자열(필수)
Prodsmart API 액세스 토큰
요청
요청
헤더
Content-Type: application/json
바디
{}
응답 200
응답 200
응답 204
응답 204
바디
Production Order was already active
응답 405
응답 405
바디
Production Order was closed or archived and cannot be activated
제품
Prodsmart API의 제품 리소스.
PRODUCT
단일 제품 객체입니다. 제품 리소스는 Prodsmart API의 가장 중요한 리소스 중 하나입니다. 이 표현식은 공장의 제품을 나타내며 생산하는 데 필요한 작업을 포함합니다. 이 방법은 새 제품 및 해당 작업을 작성합니다. 사용할 수도 있음
제품 리소스에는 다음과 같은 속성이 있습니다.
코드(문자열, 필수) - 제품 코드
이름(문자열, 필수) - 제품 이름
섹션(문자열, 선택 사항)
제품군(배열, 선택 사항)
작업(배열, 선택 사항) - 제품을 생산하는 작업
코드(문자열, 필수) - 작업 코드
이름(문자열, 필수) - 작업 이름
폐기물(배열, 선택 사항)
작업 기간(배열, 선택 사항, 최대:1)
기간(시간, 선택 사항, 예: "10H59m59s" 형식) - 이론적으로 이 작업을 실행하는 데 걸리는 평균 시간
기간-고객(시간, 선택 사항, 예: "10H59m59s" 형식) - 예산에 설정된 시간
비율 수량(이중, 선택 사항, 기본값: 1.0) - 이 작업의 각 인스턴스에서 생성된 볼륨
제품당 횟수(정수, 선택 사항, 기본값: 1) - 제품 단위를 완료하기 위해 이 작업을 수행해야 하는 횟수
맞춤형 필드(배열, 선택 사항, 시스템에 있어야 함) - 작업에 추가할 맞춤형 필드
이름(문자열, 필수) - 맞춤형 필드 이름이 이미 시스템에 작성됨
기계(배열, 선택 사항, 시스템에 있어야 함) - 작업을 수행하는 데 사용할 수 있는 기계
코드(문자열, 필수) - 시스템에 이미 작성된 기계 코드
비활성화(부울, 선택 사항) - 작업을 비활성화
선택 사항(부울, 선택 사항) - 작업을 선택 사항으로 설정
복구(부울, 선택 사항) - 작업을 복구로 설정
시간 없음(부울, 선택 사항) - 생산 시간을 등록하지 않음
수량 없음(부울, 선택 사항) - 생산 수량을 등록하지 않음
팀으로(부울, 선택 사항) - 팀으로 수행할 작업
최대 폐기물 임계값(이중, 선택 사항) - 허용되는 최대 폐기물 비율
요청에 없는 필드는 기본값으로 설정됩니다. 기존 제품/작업에 이 방법을 사용할 경우 존재하지 않는 필드는 삭제로 간주됩니다.
제품 검색
GET /api/products/{code}{?access_token}
제품을 검색하려면 제품 코드로 GET 요청을 수행하면 됩니다. 이 작업을 수행하려면 productions_write 범위가 있는 access_token이 필요합니다.
예 URI
GET /api/products/code?access_token=
URI 매개변수
URI 매개변수
코드
문자열(필수)
제품 코드.
access_token
문자열(필수)
Prodsmart API 액세스 토큰
요청
요청
헤더
Content-Type: application/json
응답 200
응답 200
바디
{ "code": "P11", "name": "Product 11", "section": null, "families": null, "color": "#8b0000", "observations": "observations", "operations": [ { "code": "op1", "name": "op1", "waste": null, "task-durations": [ { "validSince": "01/01/2022 - 13:00", "validUntil": "01/01/2100 - 13:00", "duration": "00H01m00s", "duration-customer": "00H01m00s", "ratio-quantity": 1 } ], "custom-fields": null, "machines": null, "disabled": false, "optional": false, "recovery": null, "no-time": false, "no-quantity": false, "as-team": false, "max-waste-threshold": null, "section": { "name": "specialsection" }, "id": 100 } ], "custom-fields": null, "parameters": [ { "name": "parameter1", "value": "value1" }, { "name": "parameter2", "value": "2022-12-19T00:00:00Z" }, { "name": "parameter3", "value": 1 } ], "label": { "code": "labelCode" }, "serializable": true, "id": 24}
응답 404
응답 404
바디
If product with the provided code doesn't exist.
제품 작성
POST /api/products{?access_token}
제품을 작성하려면 새 제품 및 해당 작업에 대한 속성의 JSON 해시를 제공합니다. 이 작업을 수행하려면 productions_write 범위가 있는 access_token이 필요합니다. 한 번에 여러 작업을 작성할 수 있습니다.
예 URI
POST /api/products?access_token=
URI 매개변수
URI 매개변수
access_token
문자열(필수)
Prodsmart API 액세스 토큰
요청
요청
헤더
Content-Type: application/json
바디
{ "code": "P11", "name": "Product 11", "families": [ { "code": "FG" } ], "color": "#8b0000", "observations": "observations", "operations": [ { "code": "op1", "name": "op1", "waste": [ { "code": "BROKEN" } ], "task-durations": [ { "validSince": "01/01/2022 - 13:00", "validUntil": "01/01/2100 - 13:00", "duration": "00H01m00s", "duration-customer": "00H01m00s", "ratio-quantity": 1 } ], "times-per-product": 2.0, "checklists": [ { "code": "CheckIn" } ], "machines": [ { "code": "OVEN02" } ], "disabled": false, "optional": false, "recovery": false, "no-time": false, "no-quantity": false, "as-team": false, "multi-po": false, "print-production-barcode": false, "prepare-batch-order": false, "section": { "name": "CUT" } } ], "custom-fields": null, "parameters": [ { "name": "parameter1", "value": "value1" }, { "name": "parameter2", "value": "2022-12-19T00:00:00Z" } ], "serializable": true}
응답 201
응답 201
바디
{ "code": "P11", "name": "Product 11", "families": [ { "code": "FG" } ], "color": "#8b0000", "observations": "observations", "operations": [ { "code": "op1", "name": "op1", "waste": [ { "code": "BROKEN" } ], "task-durations": [ { "validSince": "01/01/2022 - 13:00", "validUntil": "01/01/2100 - 13:00", "duration": "00H01m00s", "duration-customer": "00H01m00s", "ratio-quantity": 1 } ], "times-per-product": 2.0, "checklists": [ { "code": "CheckIn" } ], "custom-fields": null, "machines": [ { "code": "OVEN02" } ], "disabled": false, "optional": false, "recovery": null, "no-time": false, "no-quantity": false, "as-team": false, "section": { "name": "CUT" } "id":560 } ], "custom-fields": null, "parameters": [ { "name": "parameter1", "value": "value1" }, { "name": "parameter2", "value": "2022-12-19T00:00:00Z" } ], "serializable": true "id":120}
응답 400
응답 400
바디
If there's a problem with the request, the problem found will be reported on the Response Body
제품 업데이트
PUT /api/products/{code}{?access_token}
제품을 업데이트하려면 기존 제품 및 해당 작업에 대한 속성의 코드와 JSON 해시를 제공합니다. 이 작업을 수행하려면 productions_write 범위가 있는 access_token이 필요합니다. 지금은 제품 하나만 저장할 수 있지만 한 번에 여러 작업을 작성할 수 있습니다.
예 URI
PUT /api/products/code?access_token=
URI 매개변수
URI 매개변수
코드
문자열(필수)
제품 코드.
access_token
문자열(필수)
Prodsmart API 액세스 토큰
요청
요청
헤더
Content-Type: application/json
바디
{ "code": "P11", "name": "Product 11", "families": [ { "code": "FG" } ], "color": "#8b0000", "observations": "observations", "operations": [ { "code": "op1", "name": "op1", "waste": [ { "code": "BROKEN" } ], "task-durations": [ { "validSince": "01/01/2022 - 13:00", "validUntil": "01/01/2100 - 13:00", "duration": "00H01m00s", "duration-customer": "00H01m00s", "ratio-quantity": 1 } ], "times-per-product": 2.0, "checklists": [ { "code": "CheckIn" } ], "custom-fields": null, "machines": [ { "code": "OVEN02" } ], "disabled": false, "optional": false, "recovery": null, "no-time": false, "no-quantity": false, "as-team": false, "section": { "name": "CUT" } } ], "custom-fields": null, "parameters": [ { "name": "parameter1", "value": "value1" }, { "name": "parameter2", "value": "2022-12-19T00:00:00Z" } ], "serializable": true}
응답 201
응답 201
바디
{ "code": "P11", "name": "Product 11", "families": [ { "code": "FG" } ], "color": "#8b0000", "observations": "observations", "operations": [ { "code": "op1", "name": "op1", "waste": [ { "code": "BROKEN" } ], "task-durations": [ { "validSince": "01/01/2022 - 13:00", "validUntil": "01/01/2100 - 13:00", "duration": "00H01m00s", "duration-customer": "00H01m00s", "ratio-quantity": 1 } ], "times-per-product": 2.0, "checklists": [ { "code": "CheckIn" } ], "custom-fields": null, "machines": [ { "code": "OVEN02" } ], "disabled": false, "optional": false, "recovery": null, "no-time": false, "no-quantity": false, "as-team": false, "section": { "name": "CUT" } "id":560 } ], "custom-fields": null, "parameters": [ { "name": "parameter1", "value": "value1" }, { "name": "parameter2", "value": "2022-12-19T00:00:00Z" } ], "serializable": true "id":120}
응답 400
응답 400
바디
If there's a problem with the request, the problem found will be reported on the Response Body
제품 삭제
DELETE /api/products/{code}{?access_token}
제품을 삭제하려면 제품 코드를 입력합니다.
예 URI
DELETE /api/products/code?access_token=
URI 매개변수
URI 매개변수
코드
문자열(필수)
제품 코드.
access_token
문자열(필수)
Prodsmart API 액세스 토큰
요청
요청
헤더
Content-Type: application/json
바디
Content-Type: application/json
응답 204
응답 204
응답 400
응답 400
바디
If there's a problem with the request, the problem found will be reported on the Response Body
제품 나열
GET /api/products{?access_token}
제품 및 해당 작업을 나열합니다. 이 작업을 수행하려면 productions_write 범위가 있는 access_token이 필요합니다.
예 URI
GET /api/products?access_token=
URI 매개변수
URI 매개변수
access_token
문자열(필수)
Prodsmart API 액세스 토큰
페이지
숫자(선택 사항)
결과 페이지 색인, 1부터 시작
product-family-code
문자열(선택 사항)
제공된 제품군 에 속한 제품 나열
modification-date
날짜(선택 사항)
제공된 날짜 이후에 백오피스 통해 수정된 제품 나열
요청
요청
헤더
Content-Type: application/json
응답 200
응답 200
바디
{ "code": "P11", "name": "Product 11", "observations": "", "section": null, "unit-cost": null, "unit-price": 4.32000, "families": [ { "code": "FG", "name": "Finished Goods" } ], "operations": [ { "code": "op1", "name": "op1", "waste": null, "task-durations": [ { "validSince": "01/01/2022 - 13:00", "validUntil": "01/01/2100 - 13:00", "duration": "00H01m00s", "duration-customer": "00H01m00s", "ratio-quantity": 1 } ], "custom-fields": null, "parameters": [ { "name": "parameter1", "value": "value1" } ], "machines": null, "disabled": false, "optional": false, "recovery": null, "no-time": false, "no-quantity": false, "as-team": false, "max-waste-threshold": null, "section": { "name": "specialsection" }, "id": 123 } ], "components": [ { "code": "SUGAR", "name": "Sugar", "quantity": 0.0015, "operation": "MIXING" }, { "code": "VANILLA", "name": "Vanilla", "quantity": 0.0008, "operation": "MIXING" } ], "serializable": false, "custom-fields": null}
응답 400
응답 400
바디
If there's a problem with the request, the problem found will be reported on the Response Body
제품 BOM
제품의 BOM(자재 명세서) 리소스에는 특정 제품을 제조하는 데 사용되는 자재가 지정되어 있습니다. BOM에는 다음과 같은 속성이 있습니다.
제품 코드 - 주요 제품
BOM(배열, 필수)
제품 코드(문자열, 필수) - 구성 요소/소비 제품 코드
수량(이중, 필수) - 수량
작업 코드(문자열, 선택 사항) - 제품 코드에 정의된 자재가 소비되는 작업 코드. 비어 있는 경우 이 제품의 제조 공정 첫 번째 작업에서 소비가 발생합니다.
제품 상자 업데이트
POST /api/bom{?access_token}
제품의 BOM을 업데이트하려면 새 제품 및 해당 작업에 대한 속성의 JSON 해시를 제공합니다. 이 작업을 수행하려면 productions_write 범위가 있는 access_token이 필요합니다.
예 URI
POST /api/bom?access_token=
URI 매개변수
URI 매개변수
access_token
문자열(필수)
Prodsmart API 액세스 토큰
요청
요청
헤더
Content-Type: application/json
바디
{ "product-code": "bicycle", "bom": [ { "product-code": "wheel", "quantity": 2, "operation-code": "assemble" }, { "product-code": "seat", "quantity": 1, "operation-code": "assemble" } ]}
응답 201
응답 201
{ "product-code": "bicycle", "bom": [ { "product-code": "wheel", "quantity": 2, "operation-code": "assemble" }, { "product-code": "seat", "quantity": 1, "operation-code": "assemble" } ]}
응답 404
응답 404
바디
Main product not found
응답 400
응답 400
바디
If there's a problem with the request, the problem found will be reported on the Response Body
제품 재고
재고 리소스는 특정 제품에 사용 가능한 재고를 규정합니다.
제품 코드(문자열, 필수)
재고(이중, 필수)
날짜(날짜, 선택 사항) - 재고 수량 날짜
제품 재고 업데이트
POST /api/stock{?access_token}
제품의 재고를 업데이트하려면 현재 재고에 대한 속성의 JSON 해시를 제공합니다. 이 작업을 수행하려면 productions_write 범위가 있는 access_token이 필요합니다.
예 URI
POST /api/stock?access_token=
URI 매개변수
URI 매개변수
access_token
문자열(필수)
Prodsmart API 액세스 토큰
요청
요청
헤더
Content-Type: application/json
바디
{ "product-code": "bicycle", "stock": 200.5, "date": "2023-08-16T17:15:15Z"}
응답 201
응답 201
바디
Request successful
응답 404
응답 404
바디
Product not found
응답 400
응답 400
바디
If there's a problem with the request, the problem found will be reported on the Response Body
제품군
Prodsmart API의 제품 리소스.
제품군
제품군 객체는 제품이 속한 제품군을 나타냅니다.
제품군 리소스에는 다음과 같은 속성이 있습니다.
코드(문자열, 필수) - 제품군 코드
이름(문자열, 필수) - 제품군 이름
제품군 작성
POST /api/product-families{?access_token}
하나 이상의 제품군을 작성하려면· 이 작업에는 productions_write 범위를 가진 access_token이 필요합니다.
예 URI
POST /api/product-families?access_token=
URI 매개변수
URI 매개변수
access_token
문자열(필수)
Prodsmart API 액세스 토큰
요청
요청
헤더
Content-Type: application/json
바디
{ "product-families": [ { "code": "FAM 1", "name": "Family 1" }, { "code": "FAM 2", "name": "Family 2" } ]}
응답 201
응답 201
바디
[ { "code": "FAM 1", "name": "Family 1" }, { "code": "FAM 2", "name": "Family 2" }]
응답 400
응답 400
바디
If there's a problem with the request, the problem found will be reported on the Response Body
제품군 삭제
DELETE /api/product-family/{code}{?access_token}
제품군 삭제는 제품군 코드를 제공합니다.
예 URI
DELETE /api/product-family/code?access_token=
URI 매개변수
URI 매개변수
코드
문자열(필수)
제품 코드.
access_token
문자열(필수)
Prodsmart API 액세스 토큰
요청
요청
헤더
Content-Type: application/json
바디
Content-Type: application/json
응답 204
응답 204
바디
Product Family was deleted
응답 400
응답 400
바디
If there's a problem with the request, the problem found will be reported on the Response Body
제품군 나열
GET /api/product-families{?access_token}
제품군을 나열하기 위해 이 작업을 수행하려면 productions_write 범위가 있는 access_token이 필요합니다.
예 URI
GET /api/product-families?access_token=
URI 매개변수
URI 매개변수
access_token
문자열(필수)
Prodsmart API 액세스 토큰
페이지
숫자(선택 사항)
결과 페이지 색인, 1부터 시작
요청
요청
헤더
Content-Type: application/json
응답 201
응답 201
바디
[ { "code": "FAM 1", "name": "Family 1" }, { "code": "FAM 2", "name": "Family 2" }]
응답 400
응답 400
바디
If there's a problem with the request, the problem found will be reported on the Response Body
기계
Prodsmart API의 생산 리소스
카운터
카운터 업데이트
POST /api/machines/{machine_code}/counter{?access_token}
기계에서 현재 카운터를 업데이트하려면 다음 요청을 보내기만 하면 됩니다. 기계 연결을 간소화하기 위해 기본 인증을 사용하여 인증 헤더에 access_token을 사용하거나 API 자격 증명을 보낼 수 있습니다. Prodsmart는 해당 기계에서 작업자가 시작한 생산을 자동으로 업데이트합니다. 수량 개수와 폐기물 수량은 모두 증분해야 합니다(즉, 항상 이전에 보낸 수량보다 많음).
예 URI
POST /api/machines/machine_code/counter?access_token=
URI 매개변수
URI 매개변수
access_token
문자열(필수)
Prodsmart API 액세스 토큰
machine_code
문자열(필수)
Prodsmart 플랫폼에 정의된 기계 코드
요청
요청
헤더
Content-Type: application/json
바디
{ "count": 500, "waste": [ { "code": "Waste1", "quantity": 20 } ], "parameters": [ { "name": "parameter1", "value": "value1" }, { "name": "parameter2", "value": "2022-12-19T00:00:00Z" }, { "name": "parameter3", "value": 1 } ]}
응답 200
응답 200
바디
Returns the new value for the machine's counter.
응답 400
응답 400
바디
If there's a problem with the request, the problem found will be reported on the Response Body
PARAMETERS
매개변수 업데이트
POST /api/machines/{machine_code}/parameters{?access_token}
기계 매개변수를 업데이트하려면 다음 요청만 전송합니다. 기계 연결을 간소화하기 위해 기본 인증을 사용하여 인증 헤더에 access_token을 사용하거나 API 자격 증명을 보낼 수 있습니다. 이러한 매개변수가 전달되는 경우, 생산 기록이
예 URI
POST /api/machines/machine_code/parameters?access_token=
URI 매개변수
URI 매개변수
access_token
문자열(필수)
Prodsmart API 액세스 토큰
machine_code
문자열(필수)
Prodsmart 플랫폼에 정의된 기계 코드
요청
요청
헤더
Content-Type: application/json
바디
{ "parameters": [ { "code": "temperature", "value": 25 }, { "code": "valid", "value": "yes" } ]}
응답 200
응답 200
비작동 시간
비작동 시간 업데이트
POST /api/machines/{machine_code}/startstop{?access_token}
기계에서 현재 상태를 업데이트하려면 다음 요청을 보내기만 하면 됩니다. 기계 연결을 단순화하려면 기본 인증을 사용하여 인증 헤더에서 access_token을 사용하거나 API 자격 증명을 보낼 수 있습니다. Prodsmart는 수신한 정보에 따라 자동으로 비작동 시간을 등록하거나 종료합니다. 중지된 기계의 경우 0, 설정된 경우 1, 비작동 시간 유형을 지정합니다.
기계 상태를 업데이트하려면 다음 속성을 지정합니다.
유형(문자열, 필수, 기계에 이미 할당된 비작동 시간 유형이어야 함) - 비작동 시간 유형
실행 중(숫자, 필수, 0 또는 1) - 기계가 중지되었는지(0) 또는 실행 중인지(1)
예 URI
POST /api/machines/machine_code/startstop?access_token=
URI 매개변수
URI 매개변수
access_token
문자열(필수)
Prodsmart API 액세스 토큰
machine_code
문자열(필수)
Prodsmart 플랫폼에 정의된 기계 코드
요청
요청
헤더
Content-Type: application/json
바디
{ "type": "Maintenance", "running": 0}
응답 200
응답 200
생산
Prodsmart API의 생산 리소스
생산
단일 생산 객체입니다. 생산 리소스는 Prodsmart API의 중앙 리소스입니다. 이 레이블은 기간 동안 한 위치에 있는 한 명의 작업자의 레이블을 나타냅니다.
생산 리소스에는 다음과 같은 속성이 있습니다.
id
시작 시간(날짜, 필수, 형식 YYYY-MM-DDTHH:MM:SSZ) - 생산 시작 시간
종료 시간(날짜, 필수, 형식 YYYY-MM-DDTHH:MM:SSZ) - 생산 종료 시간
작업 시간(기간, 주어진, 형식 00H00m00s) - 생산 근무 시간(일정 시간/타임 리코더 내 및 비작동 시간 제외)
생산 주문(선택 사항) - 이 생산이 완료된 생산 주문
코드(문자열, 필수) - 생산 주문 코드
ID(문자열, 필수)
작업(필수) - 이 생산에서 실행된 작업
코드(문자열, 필수, 고유) - 작업 코드
제품(필수) - 이 위치에서 작업자가 작업하는 자재
수량(정수, 필요 > 0) - 이 생산에서 생산된 수량
작업자(필수) - 작업을 수행하는 사람
번호(긴 이름, 필수, 고유 번호) - 작업자 번호
생산 폐기물(배열, 선택 사항) - 작업에 결함이 있는 자재 출력
수량(숫자, 필수) - 폐기물 코드
폐기물 - 결함이 있는 자재 유형
코드(문자열, 필수, 고유) - 폐기물 코드
설명(문자열, 필수) - 폐기물 설명
결함(문자열, 필수) - 폐기물 유형
수량(정수, 필요) - 생산된 폐기물
상태 ID는 작성 시 Prodsmart API에 의해 할당됩니다.
생산 업데이트
PUT /api/productions/{id}{?access_token}
생산을 업데이트하려면 기존 생산에 대한 속성의 코드 및 JSON 해시를 제공합니다. 이 작업을 수행하려면 productions_write 범위가 있는 access_token이 필요합니다. 지금은 제품 하나만 저장할 수 있지만 한 번에 여러 작업을 작성할 수 있습니다.
예 URI
PUT /api/productions/id?access_token=
URI 매개변수
URI 매개변수
id
숫자(필수)
생산 ID.
access_token
문자열(필수)
Prodsmart API 액세스 토큰
요청
요청
헤더
Content-Type: application/json
바디
{ "shipping": { "code": "shippingexamplecode00" }, "production-order": { "code": "productionorderexample00" }, "operation": { "product-code": "otherProductCode", "code": "OtherOperationCode" }, "worker": { "number": "1000" }, "parameters": [ { "name": "parameter1", "value": "value1" }, { "name": "parameter2", "value": "2022-12-19T00:00:00Z" }, { "name": "parameter3", "value": 1 } ], "quantity": 100, "start-time": "2023-07-20T09:15:15Z", "end-time": "2023-07-20T09:15:16Z", "lot-number": "other lot", "finished": false}
응답 200
응답 200
바디
{ "id": 4629374, "production-order": { "code": "productionorderexample00", "id": 365315 }, "shipping": { "code": "shippingexamplecode00", "id": 41741 }, "operation": { "code": "OtherOperationCode", "product-code": "otherProductCode", "id": 790486 }, "worker": { "number": 1000, "name": "Worker Name", "id": 15890 }, "parameters": [ { "name": "parameter1", "value": "value1" }, { "name": "parameter2", "value": "2022-12-19T00:00:00Z" }, { "name": "parameter3", "value": 1 } ], "quantity": 100, "lot-number": "other lot", "start-time": "2023-07-20T09:15:15.000Z", "end-time": "2023-07-20T09:15:16.000Z", "finished": false}
응답 400
응답 400
바디
If there's a problem with the request, the problem found will be reported on the Response Body
생산 삭제
DELETE /api/productions/{id}{?access_token}
생산을 삭제하려면 생산 ID를 제공합니다.
예제 URI
DELETE /api/productions/id?access_token=
URI 매개변수
URI 매개변수
id
숫자(필수)
생산 ID.
access_token
문자열(필수)
Prodsmart API 액세스 토큰
요청
요청
헤더
Content-Type: application/json
바디
Content-Type: application/json
응답 201
응답 201
바디
{ "id": 4629376, "production-order": { "code": "productionorderexample00", "id": 365315 }, "shipping": { "code": "shippingexamplecode00", "id": 41741 }, "operation": { "code": "operationexample0001", "product-code": "productcodeexample001", "id": 790486 }, "worker": { "number": 1000, "name": "worker example", "id": 15890 }, "parameters": [{ "name": "parameter1", "value": "value1" }, { "name": "parameter2", "value": "2022-12-19T00:00:00Z" }, { "name": "parameter3", "value": 1.0 }], "quantity": 100.0, "lot-number": "lotX", "start-time": "2023-07-20T09:15:15.000Z", "end-time": "2023-07-20T09:15:16.000Z", "finished": false}
응답 400
응답 400
바디
If there's a problem with the request, the problem found will be reported on the Response Body
생산 나열
GET /api/productions{?access_token}
생산을 나열합니다. 여러 매개변수는 AND 조건으로 처리됩니다. 이 작업을 수행하려면 productions_write 범위가 있는 access_token이 필요합니다. 이 서비스는 페이지에 매겨져 있으며 페이지당 25개의 생산이 반환됩니다.
예 URI
GET /api/productions?access_token=
URI 매개변수
URI 매개변수
access_token
문자열(필수)
Prodsmart API 액세스 토큰
페이지
숫자(선택 사항)
결과 페이지 색인, 1부터 시작
production-order-id
숫자(선택 사항)
이 생산 주문으로 생산 나열
production-order-code
문자열(선택 사항)
이 생산 주문(한 개 또는 여러 개)으로 생산 나열
작업자
숫자(선택 사항)
이 작업자(작업자 번호)를 사용하여 생산 나열
start-time-before
날짜(선택 사항)
이 이전의 시작 시간으로 생산 나열
start-time-after
날짜(선택 사항)
이후 시작 시간의 생산 나열
end-time-before
날짜(선택 사항)
이 이전의 끝 시간을 사용하여 생산 나열
end-time-after
날짜(선택 사항)
이 이후의 종료 시간이 있는 생산 나열
start-time
날짜(선택 사항)
이 시작 시간 이후에 실행 중이던 생산 나열(이전-이후 옵션과 함께 사용하지 않음)
체크아웃됨
부울(선택 사항)
체크아웃된 생산을 나열합니다.
worker-name
부울(선택 사항)
작업자 이름만 검색하는 대신 작업자 이름과 번호를 검색합니다.
요청
요청
헤더
Content-Type: application/json
응답 200
응답 200
바디
[ { "production-order": { "code": "PO1", "id": 36530 }, "operation": { "code": "2", "product": "Product 1" }, "worker": { "number": 2 }, "machine": { "code": "Machine Code" }, "produced-waste": [ { "quantity": 21, "waste": { "code": "Waste code", "description": "Description of this type of waste", "flaw": "Flaw", "recoverable": true, "billable": false, "id": 333 } } ], "parameters": [ { "parameter1": "value1" }, { "parameter2": 2 } ], "quantity": 0, "checked-out": false, "work-time": "00H00m00s", "start-time": "2023-09-20T17:55:32.000+01:00", "end-time": "2023-09-20T18:45:00.000+01:00", "id": 575354 }]
비작동 시간
Prodsmart API의 비작동 시간 리소스.
비작동 시간
비작동 시간 나열
GET /api/downtimes{?access_token}
비작동 시간을 나열합니다. 여러 매개변수는 AND 조건으로 처리됩니다. 이 작업을 수행하려면 productions_write 범위가 있는 access_token이 필요합니다.
예 URI
GET /api/downtimes?access_token=
URI 매개변수
URI 매개변수
access_token
문자열(필수)
Prodsmart API 액세스 토큰
페이지
숫자(선택 사항)
결과 페이지 색인, 1부터 시작
start-time-before
날짜(선택 사항)
이 이전의 시작 시간으로 비작동 시간 나열
start-time-after
날짜(선택 사항)
이 이후의 시작 시간으로 비작동 시간 순서 나열
end-time-before
날짜(선택 사항)
이 이전의 종료 시간으로 비작동 시간 나열
end-time-after
날짜(선택 사항)
이 이후의 종료 시간으로 비작동 시간 나열
기계
숫자(선택 사항)
이 기계의 비작동 시간 나열
요청
요청
헤더
Content-Type: application/json
응답 200
응답 200
바디
[ { "id": 20146, "start-time": "2017-12-21T10:30:21.000Z", "end-time": "2017-12-21T10:32:21.000Z", "started-by": { "number": 2 }, "closed-by": { "number": 2 }, "workers": [], "machines": [ { "code": "M2", "name": "Machine 2" } ], "product": "ProdX", "production-order": "OP XPTO", "checked-out": true, "downtime-type": "Malfunction", "time-spent": "00H02m00s" }]
타임 리코더
Prodsmart API의 타임 리코더 리소스.
타임 리코더
웹후크는 앱의 통합 메뉴에서 타임 리코더 이벤트에 사용할 수 있습니다. 이 기능을 사용하려면 수신하려는 알림 이벤트가 있는 끝점 URL 콜백을 추가하십시오. Autodesk는 시스템에서 이벤트가 발생하는 즉시 웹후크 알림을 전송하려고 노력합니다. 현재 재시도는 지원되지 않습니다.
타임 리코더 나열
GET /api/punchclocks{?access_token}
타임 리코더를 나열합니다. 여러 매개변수는 AND 조건으로 처리됩니다. 이 작업을 수행하려면 productions_write 범위가 있는 access_token이 필요합니다.
예 URI
GET /api/punchclocks?access_token=
URI 매개변수
URI 매개변수
access_token
문자열(필수)
Prodsmart API 액세스 토큰
페이지
숫자(선택 사항)
결과 페이지 색인, 1부터 시작
date-before
날짜(선택 사항)
이 이전의 날짜를 사용하여 타임 리코더 항목 나열
date-after
날짜(선택 사항)
다음 날짜가 있는 타임 리코더 항목 나열
작업자
숫자(선택 사항)
이 작업자의 타임 리코더 항목 나열
요청
요청
헤더
Content-Type: application/json
응답 200
응답 200
바디
[{ "id": 372179, "date": "2018-09-21T09:24:06.000+01:00", "worker": { "number": 2 }, "type": 1},{ "id": 372180, "date": "2018-09-21T16:34:12.000+01:00", "worker": { "number": 2 }, "type": 0}]"type": 0 ('out') or 1 ('in')
재고 이동
Prodsmart API의 재고 이동 리소스.
재고 이동
단일 재고 이동 객체. 재고 이동 리소스는 Prodsmart API의 가장 중요한 리소스 중 하나입니다.
재고 이동 자원에는 다음과 같은 속성이 있습니다.
ID(제공됨)
제품(문자열, 필수) - 제품 코드
날짜 시간(날짜, 선택 사항, 형식 YYYY-MM-DDTHH:MM:SSZ) - 재고 이동이 생성된 날짜
수량(이중, 필요) - 재고 이동 수량
유형(문자열, 필수) - 재고 이동 유형: 입고, 출고, 소비, 생산
로트(문자열, 선택 사항) - 사용할 재고 이동 로트
총 비용(큰 십진수, 선택 사항) - 해당 수량에 대한 재고 이동 총 비용
창고 위치(문자열, 선택 사항) - 창고 위치 코드
창고(문자열, 선택 사항) - 창고 코드
위치(문자열, 선택 사항) - 여러 현장인 경우 위치
주석(문자열, 선택 사항) - 재고 이동 주석
재고 이동 검색
GET /api/inventory-movements/{id}{?access_token}
재고 이동을 검색하려면 재고 이동의 ID를 사용하여 가져오기 요청을 수행하면 됩니다. 이 작업을 수행하려면 productions_write 범위가 있는 access_token이 필요합니다.
예 URI
GET /api/inventory-movements/id?access_token=
URI 매개변수
URI 매개변수
id
숫자(필수)
재고 이동 ID.
access_token
문자열(필수)
Prodsmart API 액세스 토큰
요청
요청
헤더
Content-Type: application/json
응답 200
응답 200
바디
{ "product-code": "ProductCode", "date-time": "2018-07-20T09:15:15Z", "quantity": "10", "type": "in", "lot": "A", "total-cost": "1000", "comment": "OK", "warehouse-location": "Zone2", "shipping": { "code": "shippingCode", "clientOrder": { "code": "clientOrderCode", "client": "clientCode" }, "location": { "id": "location id", "code": "location code", "name": "location name" } }, "receiving": { "code": "receivingCode", "purchaseOrder": { "code": "purchaseOrderCode", "supplier": "supplierCode" }, "location": { "id": "location id", "code": "location code", "name": "location name" } }}
재고 이동 작성
POST /api/inventory-movements/{?access_token}
재고 이동을 작성하려면 새로운 재고 이동에 대한 속성의 JSON 해시를 제공합니다. 이 작업을 수행하려면 productions_write 범위가 있는 access_token이 필요합니다. 지금은 재고 이동 하나만 저장할 수 있습니다. 나중에 요청이 하나의 리소스가 아닌 배열인 경우 배열의 모든 항목이 저장됩니다.
예 URI
POST /api/inventory-movements/?access_token=
URI 매개변수
URI 매개변수
access_token
문자열(필수)
Prodsmart API 액세스 토큰
요청
요청
헤더
Content-Type: application/json
바디
{ "product-code": "ProductCode", "date-time": "2018-07-20T09:15:15Z", "quantity": "10", "type": "in", "lot": "A", "total-cost": "1000", "comment": "OK", "warehouse": "A", "warehouse-location": "Zone2", "location": "location code", "shipping": "shippingCode", "client-order": "clientOrderCode", "receiving": "receivingCode", "purchase-order": "purchaseOrderCode"}
응답 200
응답 200
바디
{ "product-code": "ProductCode", "date-time": "2018-07-20T09:15:15Z", "quantity": "10", "type": "in", "lot": "A", "total-cost": "1000", "comment": "OK", "warehouse-location": "Zone2", "id": 12345, "shipping": { "code": "shippingCode", "clientOrder": { "code": "clientOrderCode", "client": "clientCode" }, "location": { "id": "location id", "code": "location code", "name": "location name" } }, "receiving": { "code": "receivingCode", "purchaseOrder": { "code": "purchaseOrderCode", "supplier": "supplierCode" }, "location": { "id": "location id", "code": "location code", "name": "location name" } }}
응답 400
응답 400
바디
If there's a problem with the request, the problem found will be reported on the Response Body.
재고 이동 업데이트
PUT /api/inventory-movements/{id}{?access_token}
재고 이동을 업데이트하려면 재고 이동에서 업데이트하려는 속성을 포함하는 JSON을 제공합니다(모든 속성은 선택 사항임). 이 작업에는 access_token
이 필요합니다( productions_write scope
.
예 URI
PUT /
api/inventory-movements/id?access_token=
URI 매개변수
URI 매개변수
id
numeric
(필수)
재고 이동 ID.
access_token
string
(필수)
Prodsmart API 액세스 토큰
요청
요청
헤더
Content-Type: application/json
바디
{ "product-code": "ProductCode", "date-time": "2018-07-20T09:15:15Z", "quantity": "10", "type": "in", "lot": "A", "total-cost": "1000", "comment": "OK", "warehouse": "A", "warehouse-location": "Zone2", "receiving": "receivingCode" }
재고 이동 삭제
DELETE /api/inventory-movement/{id}{?access_token}
재고 이동을 삭제하려면 재고 이동 ID를 입력합니다.
예제 URI
DELETE /api/inventory-movement/id?access_token=
URI 매개변수
URI 매개변수
id
numeric
(필수)
재고 이동 ID.
access_token
string
(필수)
Prodsmart API 액세스 토큰
요청
요청
헤더
Content-Type: application/json
응답 204
응답 400
응답 400
It's not possible to delete this inventory-movement.
재고 이동 나열
GET /api/inventory-movements/{?access_token}
재고 이동을 나열합니다. 여러 매개변수는 AND 조건으로 처리됩니다. 이 작업을 수행하려면 productions_write 범위가 있는 access_token이 필요합니다. 이 서비스는 페이지에 매겨져 있으며 페이지당 25IM을 반환합니다.
예 URI
GET /api/inventory-movements/?access_token=
URI 매개변수
URI 매개변수
access_token
문자열(필수)
Prodsmart API 액세스 토큰
페이지
숫자(선택 사항)
결과 페이지 색인, 1부터 시작
product-code
문자열(선택 사항)
제품 코드
유형
문자열(선택 사항)
재고 이동 유형: 유입, 유출, 소비, 생산
요청
요청
헤더
Content-Type: application/json
응답 200
응답 200
바디
[ { "product-code": "ProductCode", "date-time": "2018-07-20T09:15:15Z", "quantity": "10", "type": "in", "lot": "A", "total-cost": "1000", "comment": "OK", "warehouse-location": "Zone2", "id": 12345, "shipping": { "code": "shippingCode", "clientOrder": { "code": "clientOrderCode", "client": "clientCode" }, "location": { "id": "location id", "code": "location code", "name": "location name" } }, "receiving": { "code": "receivingCode", "purchaseOrder": { "code": "purchaseOrderCode", "supplier": "supplierCode" }, "location": { "id": "location id", "code": "location code", "name": "location name" } } }]
재고
Prodsmart API의 재고 리소스.
제품 재고 검색
GET /api/stock/{code}{?access_token}
제품 재고를 검색하려면 제품 코드로 GET 요청을 수행하면 됩니다. 여러 매개변수는 AND 조건으로 처리됩니다. 이 작업을 수행하려면 productions_write 범위가 있는 access_token이 필요합니다.
예 URI
GET /api/stock/code?access_token=
URI 매개변수
URI 매개변수
코드
문자열(필수)
제품 코드.
access_token
문자열(필수)
Prodsmart API 액세스 토큰
로트
문자열(선택 사항)
제품 로트에 대한 로트 코드 및 재고 수량 검색
요청
요청
헤더
Content-Type: application/json
응답 200
응답 200
바디
{"product-code": "Example","stock": 35,"lot": [ { "code": "A", "stock": 10 }, { "code": "B", "stock": 5 }}
응답 400
응답 400
바디
If there's a problem with the request, the problem found will be reported on the Response Body.
보고서
Prodsmart API의 보고 리소스
작업자 노동 시간
작업자 노동 시간 GET/api/reports/worker-labor-time{?access_token}
보고서를 검색하려면 시간 간격과 함께 가져오기 요청을 수행하여 보고서를 추출하면 됩니다. 작업자 및 섹션 매개변수를 추가하여 보고서를 필터링할 수 있습니다. 또한 일부 플래그를 지정하여 보고서 컨텐츠를 사용자화할 수 있습니다. 모든 플래그의 기본값은 false입니다. 이 작업을 수행하려면 productions_write 범위가 있는 access_token이 필요합니다.
예 URI
GET /api/reports/worker-labor-time?access_token=
URI 매개변수
URI 매개변수
start-time
문자열(필수)
이 날짜 이후의 날짜로 보고서 생성(포함)
end-time
문자열(필수)
이 날짜 이전의 날짜로 보고서 생성(포함)
access_token
문자열(필수)
Prodsmart API 액세스 토큰
worker-number
문자열(선택 사항)
보고서를 필터링할 작업자 번호 지정
섹션
문자열(선택 사항)
섹션 이름을 지정합니다. 이 섹션의 모든 작업자가 보고서에 포함됩니다.
show-rework
부울(선택 사항)
보고서에 재작업 작업이 포함된 새 필드 포함
주말 표시
부울(선택 사항)
데이터에 주말 일간 보고서 포함
only-punch-clock
부울(선택 사항)
타임 리코더 항목이 있는 현재 시간만 고려
페이지
숫자(선택 사항)
결과 페이지 색인, 1부터 시작
요청
요청
헤더
Content-Type: application/json
응답 200
응답 200
바디
[ { "worker": { "number": "0", "name": "John" }, "presence-time": "08H00", "work-time": "04H00m00s", "percentage": "50%", "calendar-downtimes": "00H00m00s" }, { "worker": { "number": "1", "name": "Mary" }, "presence-time": "08H00", "work-time": "08H00m00s", "percentage": "100%", "calendar-downtimes": "00H00m00s" }]
응답 400
응답 400
바디
If there's a problem with the request, the problem found will be reported on the Response Body.
응답 429
응답 429
바디
Another request is ongoing for this endpoint. Please wait until the current request finishes before doing another.
액세스 권한 부여 및 제어
Prodsmart 인증 토큰에 액세스하고 제어할 수 있습니다.
인증
인증 리소스는 회사에 부여된 인증을 나타냅니다. 사용자 고유의 권한에만 액세스할 수 있습니다. 사용되는 인증은 기본 인증이며, 여기서 인증 헤더는 <base64 encoded value of API_KEY:API_SECRET> 형식으로 표시됩니다. API 키 및 암호를 얻으려면 Prodsmart에 로그인하고 사용자를 편집합니다. (노트: 이 기능을 이용하려면 관리자 역할이 있어야 합니다.) 인증 리소스에는 다음과 같은 속성이 있습니다.
토큰
범위
여기서 토큰은 토큰을 나타내고 범위는 지정된 인증에 대해 허가된 범위의 배열입니다. 현재 사용 가능한 유일한 범위는 productions_write
포함).
권한 검색
GET /api/authorization
GET을 사용하여 기존 액세스 토큰을 검색합니다. 토큰이 아직 없는 경우 POST 방법을 사용하여 토큰을 생성할 수 있습니다.
예 URI
GET /api/authorization
요청
요청
헤더
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
응답 200
응답 200
헤더
Content-Type: application/jsonLink: <http:/api.prodsmart.com/api/authorizations>;rel="self"
바디
{ "_links": { "self": { "href": "/api/authorizations" }, }, "scopes": [ "productions_write" ], "token": "abc123"}
권한 부여 작성
POST /api/authorization
POST를 사용하여 새 액세스 토큰을 생성합니다.
예 URI
POST /api/authorization
요청
요청
헤더
Content-Type: application/jsonAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
바디
{ "scopes": [ "productions_write" ] }
응답 201
응답 201
헤더
Content-Type: application/jsonLink: <http:/api.prodsmart.com/api/authorizations>;rel="self"
바디
{ "_links": { "self": { "href": "/api/authorizations" }, }, "scopes": [ "productions_write" ], "token": "abc123"}
권한 제거
DELETE /api/authorization
예 URI
DELETE /api/authorization
요청
요청
헤더
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
응답 204
응답 204