keitaro-api-skill/references/paths/groups_id_delete.yaml

57 lines
1.2 KiB
YAML

delete:
tags:
- Groups
security:
- ApiKeyAuth: []
parameters:
- name: id
in: path
description: Group ID
required: true
schema:
type: integer
summary: Delete Group
description: Delete a Group
responses:
'200':
description: Group
content:
application/json:
schema:
$ref: ../schemas/Group.yaml
'400':
$ref: ../responses/BadRequest.yaml
'401':
$ref: ../responses/Unauthorized.yaml
'402':
$ref: ../responses/PaymentRequired.yaml
'404':
$ref: ../responses/NotFound.yaml
'500':
$ref: ../responses/InternalError.yaml
x-code-samples:
- lang: PHP
source: >-
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,
'http://example.com/admin_api/v1/offers/19/delete');
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
$params = [
'id' => 19
];
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
echo curl_exec($ch);