정산 부분 수정
curl --request PATCH \
--url https://openapi.pluuug.com/v1/settlement/{settlement_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--header 'X-Signature: <api-key>' \
--data '
{
"title": "<string>",
"amount": 1,
"additionalAmount": 1,
"vat": 1,
"dueDate": "2023-12-25",
"settledDate": "2023-12-25",
"isTaxInvoiceIssued": true,
"isTaxInvoiceNeeded": true,
"taxInvoiceIssuedDate": "2023-12-25",
"taxInvoiceIssueDueDate": "2023-12-25",
"inChargeSet": [
{
"id": 123
}
]
}
'import requests
url = "https://openapi.pluuug.com/v1/settlement/{settlement_id}"
payload = {
"title": "<string>",
"amount": 1,
"additionalAmount": 1,
"vat": 1,
"dueDate": "2023-12-25",
"settledDate": "2023-12-25",
"isTaxInvoiceIssued": True,
"isTaxInvoiceNeeded": True,
"taxInvoiceIssuedDate": "2023-12-25",
"taxInvoiceIssueDueDate": "2023-12-25",
"inChargeSet": [{ "id": 123 }]
}
headers = {
"X-API-Key": "<api-key>",
"X-Signature": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'X-API-Key': '<api-key>',
'X-Signature': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
title: '<string>',
amount: 1,
additionalAmount: 1,
vat: 1,
dueDate: '2023-12-25',
settledDate: '2023-12-25',
isTaxInvoiceIssued: true,
isTaxInvoiceNeeded: true,
taxInvoiceIssuedDate: '2023-12-25',
taxInvoiceIssueDueDate: '2023-12-25',
inChargeSet: [{id: 123}]
})
};
fetch('https://openapi.pluuug.com/v1/settlement/{settlement_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://openapi.pluuug.com/v1/settlement/{settlement_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'title' => '<string>',
'amount' => 1,
'additionalAmount' => 1,
'vat' => 1,
'dueDate' => '2023-12-25',
'settledDate' => '2023-12-25',
'isTaxInvoiceIssued' => true,
'isTaxInvoiceNeeded' => true,
'taxInvoiceIssuedDate' => '2023-12-25',
'taxInvoiceIssueDueDate' => '2023-12-25',
'inChargeSet' => [
[
'id' => 123
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>",
"X-Signature: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://openapi.pluuug.com/v1/settlement/{settlement_id}"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"amount\": 1,\n \"additionalAmount\": 1,\n \"vat\": 1,\n \"dueDate\": \"2023-12-25\",\n \"settledDate\": \"2023-12-25\",\n \"isTaxInvoiceIssued\": true,\n \"isTaxInvoiceNeeded\": true,\n \"taxInvoiceIssuedDate\": \"2023-12-25\",\n \"taxInvoiceIssueDueDate\": \"2023-12-25\",\n \"inChargeSet\": [\n {\n \"id\": 123\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("X-Signature", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://openapi.pluuug.com/v1/settlement/{settlement_id}")
.header("X-API-Key", "<api-key>")
.header("X-Signature", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"amount\": 1,\n \"additionalAmount\": 1,\n \"vat\": 1,\n \"dueDate\": \"2023-12-25\",\n \"settledDate\": \"2023-12-25\",\n \"isTaxInvoiceIssued\": true,\n \"isTaxInvoiceNeeded\": true,\n \"taxInvoiceIssuedDate\": \"2023-12-25\",\n \"taxInvoiceIssueDueDate\": \"2023-12-25\",\n \"inChargeSet\": [\n {\n \"id\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://openapi.pluuug.com/v1/settlement/{settlement_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["X-Signature"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"amount\": 1,\n \"additionalAmount\": 1,\n \"vat\": 1,\n \"dueDate\": \"2023-12-25\",\n \"settledDate\": \"2023-12-25\",\n \"isTaxInvoiceIssued\": true,\n \"isTaxInvoiceNeeded\": true,\n \"taxInvoiceIssuedDate\": \"2023-12-25\",\n \"taxInvoiceIssueDueDate\": \"2023-12-25\",\n \"inChargeSet\": [\n {\n \"id\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"title": "<string>",
"amount": 1,
"additionalAmount": 1,
"vat": 1,
"settlementRound": 123,
"isTaxInvoiceIssued": true,
"isTaxInvoiceNeeded": true,
"typeAlias": "<string>",
"created": "2023-11-07T05:31:56Z",
"contract": {
"id": 123,
"title": "<string>",
"amount": 123,
"startDate": "2023-12-25",
"endDate": "2023-12-25"
},
"type": {
"id": 123,
"title": "<string>",
"allowsMultipleRounds": true
},
"dueDate": "2023-12-25",
"settledDate": "2023-12-25",
"taxInvoiceIssuedDate": "2023-12-25",
"taxInvoiceIssueDueDate": "2023-12-25",
"inChargeSet": [
{
"id": 123,
"nickname": "<string>",
"email": "<string>",
"isActive": true,
"grade": {
"id": 123,
"title": "<string>"
}
}
]
}{
"nonField": [
"<string>"
],
"title": [
"<string>"
],
"amount": [
"<string>"
],
"additionalAmount": [
"<string>"
],
"vat": [
"<string>"
],
"dueDate": [
"<string>"
],
"settledDate": [
"<string>"
],
"isTaxInvoiceIssued": [
"<string>"
],
"isTaxInvoiceNeeded": [
"<string>"
],
"taxInvoiceIssuedDate": [
"<string>"
],
"taxInvoiceIssueDueDate": [
"<string>"
],
"inChargeSet": [
"<string>"
]
}정산
정산 부분 수정
정산 정보를 부분 수정합니다.
부수효과: status 변경 시 SettlementStatusHistory가 자동 생성됩니다. 변경 이력은 정산 히스토리 API로 조회할 수 있습니다.
PATCH
/
v1
/
settlement
/
{settlement_id}
정산 부분 수정
curl --request PATCH \
--url https://openapi.pluuug.com/v1/settlement/{settlement_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--header 'X-Signature: <api-key>' \
--data '
{
"title": "<string>",
"amount": 1,
"additionalAmount": 1,
"vat": 1,
"dueDate": "2023-12-25",
"settledDate": "2023-12-25",
"isTaxInvoiceIssued": true,
"isTaxInvoiceNeeded": true,
"taxInvoiceIssuedDate": "2023-12-25",
"taxInvoiceIssueDueDate": "2023-12-25",
"inChargeSet": [
{
"id": 123
}
]
}
'import requests
url = "https://openapi.pluuug.com/v1/settlement/{settlement_id}"
payload = {
"title": "<string>",
"amount": 1,
"additionalAmount": 1,
"vat": 1,
"dueDate": "2023-12-25",
"settledDate": "2023-12-25",
"isTaxInvoiceIssued": True,
"isTaxInvoiceNeeded": True,
"taxInvoiceIssuedDate": "2023-12-25",
"taxInvoiceIssueDueDate": "2023-12-25",
"inChargeSet": [{ "id": 123 }]
}
headers = {
"X-API-Key": "<api-key>",
"X-Signature": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'X-API-Key': '<api-key>',
'X-Signature': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
title: '<string>',
amount: 1,
additionalAmount: 1,
vat: 1,
dueDate: '2023-12-25',
settledDate: '2023-12-25',
isTaxInvoiceIssued: true,
isTaxInvoiceNeeded: true,
taxInvoiceIssuedDate: '2023-12-25',
taxInvoiceIssueDueDate: '2023-12-25',
inChargeSet: [{id: 123}]
})
};
fetch('https://openapi.pluuug.com/v1/settlement/{settlement_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://openapi.pluuug.com/v1/settlement/{settlement_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'title' => '<string>',
'amount' => 1,
'additionalAmount' => 1,
'vat' => 1,
'dueDate' => '2023-12-25',
'settledDate' => '2023-12-25',
'isTaxInvoiceIssued' => true,
'isTaxInvoiceNeeded' => true,
'taxInvoiceIssuedDate' => '2023-12-25',
'taxInvoiceIssueDueDate' => '2023-12-25',
'inChargeSet' => [
[
'id' => 123
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>",
"X-Signature: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://openapi.pluuug.com/v1/settlement/{settlement_id}"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"amount\": 1,\n \"additionalAmount\": 1,\n \"vat\": 1,\n \"dueDate\": \"2023-12-25\",\n \"settledDate\": \"2023-12-25\",\n \"isTaxInvoiceIssued\": true,\n \"isTaxInvoiceNeeded\": true,\n \"taxInvoiceIssuedDate\": \"2023-12-25\",\n \"taxInvoiceIssueDueDate\": \"2023-12-25\",\n \"inChargeSet\": [\n {\n \"id\": 123\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("X-Signature", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://openapi.pluuug.com/v1/settlement/{settlement_id}")
.header("X-API-Key", "<api-key>")
.header("X-Signature", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"amount\": 1,\n \"additionalAmount\": 1,\n \"vat\": 1,\n \"dueDate\": \"2023-12-25\",\n \"settledDate\": \"2023-12-25\",\n \"isTaxInvoiceIssued\": true,\n \"isTaxInvoiceNeeded\": true,\n \"taxInvoiceIssuedDate\": \"2023-12-25\",\n \"taxInvoiceIssueDueDate\": \"2023-12-25\",\n \"inChargeSet\": [\n {\n \"id\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://openapi.pluuug.com/v1/settlement/{settlement_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["X-Signature"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"amount\": 1,\n \"additionalAmount\": 1,\n \"vat\": 1,\n \"dueDate\": \"2023-12-25\",\n \"settledDate\": \"2023-12-25\",\n \"isTaxInvoiceIssued\": true,\n \"isTaxInvoiceNeeded\": true,\n \"taxInvoiceIssuedDate\": \"2023-12-25\",\n \"taxInvoiceIssueDueDate\": \"2023-12-25\",\n \"inChargeSet\": [\n {\n \"id\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"title": "<string>",
"amount": 1,
"additionalAmount": 1,
"vat": 1,
"settlementRound": 123,
"isTaxInvoiceIssued": true,
"isTaxInvoiceNeeded": true,
"typeAlias": "<string>",
"created": "2023-11-07T05:31:56Z",
"contract": {
"id": 123,
"title": "<string>",
"amount": 123,
"startDate": "2023-12-25",
"endDate": "2023-12-25"
},
"type": {
"id": 123,
"title": "<string>",
"allowsMultipleRounds": true
},
"dueDate": "2023-12-25",
"settledDate": "2023-12-25",
"taxInvoiceIssuedDate": "2023-12-25",
"taxInvoiceIssueDueDate": "2023-12-25",
"inChargeSet": [
{
"id": 123,
"nickname": "<string>",
"email": "<string>",
"isActive": true,
"grade": {
"id": 123,
"title": "<string>"
}
}
]
}{
"nonField": [
"<string>"
],
"title": [
"<string>"
],
"amount": [
"<string>"
],
"additionalAmount": [
"<string>"
],
"vat": [
"<string>"
],
"dueDate": [
"<string>"
],
"settledDate": [
"<string>"
],
"isTaxInvoiceIssued": [
"<string>"
],
"isTaxInvoiceNeeded": [
"<string>"
],
"taxInvoiceIssuedDate": [
"<string>"
],
"taxInvoiceIssueDueDate": [
"<string>"
],
"inChargeSet": [
"<string>"
]
}Authorizations
HMAC-SHA256 방식으로 body를 secret key로 해싱하여 생성한 서명을 넣어야 합니다. 서버는 X-API-Key와 대응되는 secret key로 서명을 검증합니다.
Path Parameters
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
정산 제목
Required string length:
1 - 128정산 금액
Required range:
x >= 0추가 금액
Required range:
x >= 0부가세
Required range:
x >= 0지급 예정일
지급 완료일
세금 계산서 발행 여부
세금 계산서 발행 필요 여부
세금 계산서 발행 날짜
세금 계산서 발행 예정 날짜
담당자
Show child attributes
Show child attributes
Response
정산 제목
Maximum string length:
128정산 상태
C- 정산 예정D- 정산 지연S- 정산 완료P- 정산 중단
Available options:
C, D, S, P 정산 금액
Required range:
x >= 0추가 금액
Required range:
x >= 0부가세
Required range:
x >= 0정산 차수
세금 계산서 발행 여부
세금 계산서 발행 필요 여부
정산 형태
생성일시
계약
Show child attributes
Show child attributes
정산 형태
Show child attributes
Show child attributes
지급 예정일
지급 완료일
세금 계산서 발행 날짜
세금 계산서 발행 예정 날짜
담당자
Show child attributes
Show child attributes
⌘I