diff --git a/docs/swagger/paths/v1_short-codes.json b/docs/swagger/paths/v1_short-codes.json index bdeffe3f..c63a11a9 100644 --- a/docs/swagger/paths/v1_short-codes.json +++ b/docs/swagger/paths/v1_short-codes.json @@ -116,6 +116,7 @@ } } }, + "post": { "tags": [ "ShortCodes" @@ -140,6 +141,34 @@ "type": "string" } }, + { + "name": "validSince", + "in": "formData", + "description": "The date (in ISO-8601 format) from which this short code will be valid", + "required": false, + "type": "string" + }, + { + "name": "validUntil", + "in": "formData", + "description": "The date (in ISO-8601 format) until which this short code will be valid", + "required": false, + "type": "string" + }, + { + "name": "customSlug", + "in": "formData", + "description": "A unique custom slug to be used instead of the generated short code", + "required": false, + "type": "string" + }, + { + "name": "maxVisits", + "in": "formData", + "description": "The maximum number of allowed visits for this short code", + "required": false, + "type": "number" + }, { "$ref": "../parameters/Authorization.json" } diff --git a/docs/swagger/paths/v1_short-codes_{shortCode}.json b/docs/swagger/paths/v1_short-codes_{shortCode}.json index 78e54f61..01fdd634 100644 --- a/docs/swagger/paths/v1_short-codes_{shortCode}.json +++ b/docs/swagger/paths/v1_short-codes_{shortCode}.json @@ -54,5 +54,69 @@ } } } + }, + + "put": { + "tags": [ + "ShortCodes" + ], + "summary": "Edit short code", + "description": "Update certain meta arguments from an existing short URL.", + "parameters": [ + { + "name": "shortCode", + "in": "path", + "type": "string", + "description": "The short code to edit.", + "required": true + }, + { + "name": "validSince", + "in": "formData", + "description": "The date (in ISO-8601 format) from which this short code will be valid", + "required": false, + "type": "string" + }, + { + "name": "validUntil", + "in": "formData", + "description": "The date (in ISO-8601 format) until which this short code will be valid", + "required": false, + "type": "string" + }, + { + "name": "maxVisits", + "in": "formData", + "description": "The maximum number of allowed visits for this short code", + "required": false, + "type": "number" + }, + { + "$ref": "../parameters/Authorization.json" + } + ], + "responses": { + "204": { + "description": "The short code has been properly updated." + }, + "400": { + "description": "Provided meta arguments are invalid.", + "schema": { + "$ref": "../definitions/Error.json" + } + }, + "404": { + "description": "No short URL was found for provided short code.", + "schema": { + "$ref": "../definitions/Error.json" + } + }, + "500": { + "description": "Unexpected error.", + "schema": { + "$ref": "../definitions/Error.json" + } + } + } } }