V1Contracts

保証契約キャンセル

PUT
/v1/contracts/{contractId}/refund

保証契約のステータスにより、請求金額が変わってきます。 また、保証期間が実際に開始されている場合は実際に保証した日割り分をご請求\ご返金致します。

X-Proteger-Auth-Token<token>

In: header

Path Parameters

contractId*string

保証契約ID

Query Parameters

commit?boolean

値「false」を使用して、キャンセル見積もりのプレビューを取得します。 これには、キャンセルされた契約に対して返金される金額が含まれます。 値「true」を使用するか、クエリパラメータを省略した場合、proteger は契約キャンセルを実行します。

Header Parameters

X-Proteger-Auth-Token*string

protegerAccessToken

Content-Type*string

application/json

Accept*string

application/json

Response Body

application/json

application/json

curl -X PUT "https://example.com/v1/contracts/c10a0882-2b11-633d-7de6-0563bbf9dbed/refund?commit=true" \  -H "X-Proteger-Auth-Token: string" \  -H "Content-Type: string" \  -H "Accept: string"
{  "id": "c10a0882-2b11-633d-7de6-0563bbf9dbed",  "inquiryCode": "892hv238",  "transactionId": "order0001",  "transactionTotal": 12000,  "transactionDate": "2021-01-31T13:16:06.239289+09:00",  "refundAmount": 1000,  "customer": {    "id": "c10a0882-2b11-633d-7de6-0563bbf9dbed",    "referenceId": "c10a0882-2b11-633d-7de6-0563bbf9dbed",    "name": "山田 太郎",    "email": "user@example.com",    "phone": "0120-XXXX-XXXX",    "billingAddress": {      "postalNumber": "227-0043",      "prefecture": "神奈川県",      "city": "横浜市青葉区藤が丘",      "address": "1-49-1",      "building": "XXXハイム 306"    },    "shippingAddress": {      "postalNumber": "227-0043",      "prefecture": "神奈川県",      "city": "横浜市青葉区藤が丘",      "address": "1-49-1",      "building": "XXXハイム 306"    }  },  "product": {    "id": "c10a0882-2b11-633d-7de6-0563bbf9dbed",    "referenceId": "c10a0882-2b11-633d-7de6-0563bbf9dbed",    "title": "ノートPC",    "price": 10000,    "imageUrl": "https://helloproteger.com/image/10vj12.png",    "category": "パソコン",    "brand": "Apple",    "purchasePrice": 10000,    "serialNumber": "12304981",    "createdAt": "2021-01-31T13:16:06.239289+09:00",    "updatedAt": "2021-01-31T13:16:06.239289+09:00"  },  "plan": {    "id": "c10a0882-2b11-633d-7de6-0563bbf9dbed",    "title": "1年延長保証",    "price": 2000,    "termLength": 12,    "serviceType": "Repair",    "protectionType": "Base",    "url": "string"  },  "isFulfilled": true,  "status": "Active",  "startedAt": "2021-01-31T13:16:06.239289+09:00",  "endedAt": "2021-01-31T13:16:06.239289+09:00",  "createdAt": "2021-01-31T13:16:06.239289+09:00",  "updatedAt": "2021-01-31T13:16:06.239289+09:00"}
{  "requestId": "kJZQv3lyB2rjHKNbeGBy5HMet4MO0nw9",  "code": "BadRequestException",  "error": "failed create contract: failed get product: not found"}