v1

latestSwagger 2.02026-07-1312672.0 KB
posts

Retrieve a post

get/posts/{post_id}

Path parameters

post_idstring required

The ID of the post to retrieve.

Response

The post.

post_idstring
sourcestring

The source of the post. One of: groups, trashnothing, open_archive_groups. A value of groups or open_archive_groups indicates the post is from a group and the group_id field will contain the ID of the group. A value of trashnothing indicates the post is a public post not associated with any group.

group_idstring

The group ID of the post. For public posts, this is always null.

user_idstring
titlestring
contentstring
datestring date-time

The UTC date and time when the post was published.

typestring

The type of post. One of: offer, wanted, admin

outcomestring

For offer and wanted posts, this indicates the outcome of the post which is null if no outcome has been set yet. <br /><br /> Offer post outcomes will be one of: satisfied, withdrawn, promised, expired <br /><br /> Wanted post outcomes will be one of: satisfied, withdrawn, expired <br /><br /> For all other posts, outcome is always null.

latitudenumber

May be null if a post hasn't been mapped.

longitudenumber

May be null if a post hasn't been mapped.

footerstring

Some groups add footers to posts that are separate and sometimes unrelated to the post itself - such as reminders about group rules or features (may be null).

expirationstring date-time

The UTC date and time when the post will expire. Currently only offer and wanted posts expire. For all other posts, expiration is always null.

resellingboolean

For wanted posts, whether the item is being requested in order to resell it or not. Will be null for all posts that are not wanted posts and for wanted posts where the poster hasn't indicated whether or not they intend to resell the item they are requesting.

urlstring

The link to use to view the post on the Trash Nothing site.

repost_countinteger

The count of how many times this post has been reposted in the last 90 days. A value of zero is used to indicate that the post is not a repost. The count is specific to the source of the post (eg. the specific group the post is on). If a post is crossposted to multiple groups, the repost_count of the post on each group may be different for each group depending on how many times the post has been posted on that group in the last 90 days.

Example response

{
  "post_id": 3171898,
  "group_id": 6,
  "user_id": 2933,
  "title": "Ultrasonic diffuser (Downtown Toronto)",
  "content": "This ultrasonic diffuser creates an aroma in your home. It comes with two essential oils - mint and lavender.",
  "date": "2018-02-05T15:10:21",
  "type": "offer",
  "outcome": "satisfied",
  "latitude": 43.653226,
  "longitude": -79.383184,
  "footer": null,
  "photos": [
    {
      "photo_id": "695624-768616",
      "thumbnail": "https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.90x120.jpg",
      "url": "https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.375x500.jpg",
      "images": [
        {
          "url": "https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.90x120.jpg",
          "width": 90,
          "height": 120
        },
        {
          "url": "https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.180x240.jpg",
          "width": 180,
          "height": 240
        },
        {
          "url": "https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.270x360.jpg",
          "width": 270,
          "height": 360
        },
        {
          "url": "https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.375x500.jpg",
          "width": 375,
          "height": 500
        }
      ]
    }
  ],
  "expiration": "2018-03-05T15:10:21",
  "reselling": false,
  "url": "https://trashnothing.com/post/3171898/ultrasonic-diffuser-downtown-torronto",
  "repost_count": 1
}