trash nothing
  1. posts
trash nothing
  • messages
    • List conversations
      GET
    • Mark all conversations as read
      PUT
    • Search conversations
      GET
    • Delete conversation
      DELETE
    • Archive conversation
      PUT
    • Block conversation
      PUT
    • Mark conversation as read
      PUT
    • List conversation messages
      GET
    • Reply to conversation
      POST
    • Report conversation
      POST
    • Unarchive conversation
      PUT
    • Unblock conversation
      PUT
  • misc
    • Send feedback
  • groups
    • Search groups
    • Retrieve multiple groups
    • Join groups
    • Retrieve a group
    • Submit group answers
    • Contact group moderators
    • Leave a group
  • photos
    • Create a photo
    • Retrieve multiple photos
    • Delete a photo
    • Rotate a photo
  • posts
    • List posts
      GET
    • Submit a post
      POST
    • List all posts
      GET
    • List all post changes
      GET
    • Retrieve client.js
      GET
    • Retrieve multiple posts
      GET
    • Search posts
      GET
    • Retrieve a post
      GET
    • Update a post
      PUT
    • Delete a post bookmark
      DELETE
    • Bookmark a post
      PUT
    • Retrieve post display data
      GET
    • Flag a post
      POST
    • Map a post
      PUT
    • Promise an offer post
      PUT
    • Reply to a post
      POST
    • Satisfy a post
      PUT
    • Share a post
      POST
    • Unpromise an offer post
      PUT
    • Withdraw a post
      PUT
  • stories
    • List stories
    • Submit a story
    • Retrieve a story
    • Like a story
    • Unlike a story
    • Record story viewed
  • users
    • Retrieve current user
    • Update current user
    • List current users' email alerts
    • Create an email alert
    • Delete an email alert
    • Change email address
    • Set users' email address as not bouncing
    • List current users' groups
    • Update location
    • List current users' group notices
    • List current users' post locations
    • Save a post location for the current user
    • List current users' posts
    • Search current users' posts
    • Set a profile image
    • List current users' profile images
    • Resend account verification email
    • Send password reset email
    • Report a user
    • Retrieve a user
    • Retrieve user display info
    • Submit feedback on a user
    • List posts by a user
    • Search posts by a user
    • Retrieve a users' profile image
  1. posts

Retrieve post display data

GET
/posts/{post_id}/display
posts
Retrieve a post and other data related to the post that is useful for displaying the post such as data about the user who posted the post and the groups the post was posted on.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://trashnothing.com/api/v1.2/posts//display'
Response Response Example
200 - Example 1
{
    "author": {
        "about_me": "Just an old fisherman looking to reuse more.",
        "country": "GB",
        "feedback": {
            "percent_positive": 87.5,
            "restriction": "no-recent-messages",
            "score": 7
        },
        "firstname": null,
        "lastname": null,
        "member_since": "2017-01-27T06:35:55",
        "profile_image": "https://lh3.googleusercontent.com/-1qVLzuOCyYg/AAAAAAAAAAI/AAAAAAAAAAA/0aGNzRAO61c/s64-c/100783935580725962164.jpg",
        "reply_time": 4850,
        "user_id": 2946512,
        "username": "fred gibson"
    },
    "author_offer_count": 0,
    "author_posts": [
        {
            "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",
            "footer": null,
            "group_id": 6,
            "latitude": 43.653226,
            "longitude": -79.383184,
            "outcome": "satisfied",
            "photos": [
                {
                    "images": [
                        {
                            "height": 120,
                            "url": "https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.90x120.jpg",
                            "width": 90
                        },
                        {
                            "height": 240,
                            "url": "https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.180x240.jpg",
                            "width": 180
                        },
                        {
                            "height": 360,
                            "url": "https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.270x360.jpg",
                            "width": 270
                        },
                        {
                            "height": 500,
                            "url": "https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.375x500.jpg",
                            "width": 375
                        }
                    ],
                    "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"
                }
            ],
            "post_id": 3171898,
            "title": "Ultrasonic diffuser (Downtown Toronto)",
            "type": "offer",
            "user_id": 2933
        }
    ],
    "author_wanted_count": 0,
    "bookmarked": true,
    "feedback": [
        {
            "content": "Fred gave me a great antique table for my new apartment!",
            "date": "2020-03-01T12:01:22",
            "positive": true,
            "reviewer_user_id": 9191,
            "user_id": 2946512
        }
    ],
    "geolocate_bounds": {
        "default": {
            "northeast": {
                "latitude": 52.8293255665,
                "longitude": -0.600956182
            },
            "southwest": {
                "latitude": 51.0025285305,
                "longitude": -3.5323240284
            }
        },
        "limit": {
            "northeast": {
                "latitude": 52.8293255665,
                "longitude": -0.600956182
            },
            "southwest": {
                "latitude": 51.0025285305,
                "longitude": -3.5323240284
            }
        }
    },
    "groups": [
        {
            "country": {
                "abbreviation": "CA",
                "name": "Canada"
            },
            "group_id": 46,
            "has_questions": true,
            "homepage": "https://trashnothing.com/OttawaReuse",
            "identifier": "OttawaReuse",
            "latitude": 45.423494,
            "longitude": -75.697933,
            "member_count": 4838,
            "membership": {
                "date": "2015-01-22T17:05:50",
                "questionnaire": {
                    "message": "This group is only for people who live in Ottawa.",
                    "questions": [
                        "Where do you live?"
                    ]
                },
                "status": "pending-questions"
            },
            "name": "Ottawa Reuse",
            "open_archives": false,
            "open_membership": false,
            "region": {
                "abbreviation": "ON",
                "name": "Ontario"
            },
            "timezone": "America/Toronto",
            "utc_offset": -5
        }
    ],
    "post": {
        "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",
        "footer": null,
        "group_id": 6,
        "latitude": 43.653226,
        "longitude": -79.383184,
        "outcome": "satisfied",
        "photos": [
            {
                "images": [
                    {
                        "height": 120,
                        "url": "https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.90x120.jpg",
                        "width": 90
                    },
                    {
                        "height": 240,
                        "url": "https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.180x240.jpg",
                        "width": 180
                    },
                    {
                        "height": 360,
                        "url": "https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.270x360.jpg",
                        "width": 270
                    },
                    {
                        "height": 500,
                        "url": "https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.375x500.jpg",
                        "width": 375
                    }
                ],
                "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"
            }
        ],
        "post_id": 3171898,
        "title": "Ultrasonic diffuser (Downtown Toronto)",
        "type": "offer",
        "user_id": 2933
    },
    "replied": true,
    "user_can_reply": true,
    "viewed": true
}

Request

Path Params
post_id
string 
required
The ID of the post to retrieve.

Responses

🟢200The post and related data.
application/json
Body
author
object (User) 
optional
Example:
{"about_me":"Just an old fisherman looking to reuse more.","country":"GB","feedback":{"percent_positive":87.5,"restriction":"no-recent-messages","score":7},"firstname":null,"lastname":null,"member_since":"2017-01-27T06:35:55","profile_image":"https://lh3.googleusercontent.com/-1qVLzuOCyYg/AAAAAAAAAAI/AAAAAAAAAAA/0aGNzRAO61c/s64-c/100783935580725962164.jpg","reply_time":4850,"user_id":2946512,"username":"fred gibson"}
about_me
string 
optional
A short bio a user has written about themselves to help other members get to know them better. May be null if the user has not written anything about themselves.
country
string 
optional
A 2 letter country code for the country that has been automatically detected for the user (see https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 ). May be null if no country has been set.
feedback
object 
optional
firstname
string 
optional
The first name of the user (may be null).
lastname
string 
optional
The last name of the user (may be null).
member_since
string 
optional
The date and time when the user first became publicly active on a group (the date may be older than when the user signed up).
profile_image
string 
optional
A URL to a profile image for the user. Profile images sizes vary based on the source (Google, Facebook, Gravatar, etc) and some can be as small as 64px by 64px. Will be null for api key requests and requests where the oauth user doesn't belong to any of the same groups as this user.
reply_time
integer 
optional
An estimate of how many seconds it takes this user to reply to messages. May be null when there is not enough data to calculate an estimate.
user_id
string 
optional
username
string 
optional
A username that can be displayed for the user (the username is NOT guaranteed to be unique). Will be null for api key requests and requests where the oauth user doesn't belong to any of the same groups as this user.
author_offer_count
integer 
optional
Count of offer posts made by the post author in the last 90 days.
author_posts
array[object (Post) {15}] 
optional
Other active posts from the post author in the last 90 days. A maximum of 30 posts will be returned.
content
string 
optional
date
string <date-time>
optional
The UTC date and time when the post was published.
expiration
string <date-time>
optional
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.
footer
string 
optional
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).
group_id
string 
optional
The group ID of the post. For public posts, this is always null.
latitude
number 
optional
May be null if a post hasn't been mapped.
longitude
number 
optional
May be null if a post hasn't been mapped.
outcome
string 
optional
For offer and wanted posts, this indicates the outcome of the post which is null if no outcome has been set yet.

Offer post outcomes will be one of: satisfied, withdrawn, promised, expired

Wanted post outcomes will be one of: satisfied, withdrawn, expired

For all other posts, outcome is always null.
photos
array[object (Photo) {5}] 
optional
Details about the photos associated with this post (may be null if there are no photos).
post_id
string 
optional
source
string 
optional
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.
title
string 
optional
type
string 
optional
The type of post. One of: offer, taken, wanted, received, admin
url
string 
optional
The link to use to view the post on the trash nothing site.
user_id
string 
optional
author_wanted_count
integer 
optional
Count of wanted posts made by the post author in the last 90 days.
bookmarked
boolean 
optional
Whether or not the current user has bookmarked this post. Will be null for api key requests and for the current users' posts.
feedback
array[object (Feedback) {5}] 
optional
Feedback the current user has left on the post author.
content
string 
optional
A comment written by the reviewer about the user (may be null).
date
string <date-time>
optional
Date when the feedback was submitted.
positive
boolean 
optional
Set to true for positive feedback and false for negative feedback.
reviewer_user_id
string 
optional
The user ID of the user that submitted the feedback.
user_id
string 
optional
The user ID of the user that the feedback is about.
geolocate_bounds
object (GeolocateBounds) 
optional
Two bounding boxes that make using Google Maps' geocoder easier.

The default bounding box defines the area in which the post is probably located. This is useful for providing a bounds to Google Maps geocoder.

The limit bounding box is a larger bounding box that contains the default bounding box. This is useful for discarding Google Maps geocoding results that are outside of this bounding box.
default
object (BoundingBox) 
optional
A geographic bounding box defined by its southwest and northeast points.
Example:
{"northeast":{"latitude":52.8293255665,"longitude":-0.600956182},"southwest":{"latitude":51.0025285305,"longitude":-3.5323240284}}
limit
object (BoundingBox) 
optional
A geographic bounding box defined by its southwest and northeast points.
Example:
{"northeast":{"latitude":52.8293255665,"longitude":-0.600956182},"southwest":{"latitude":51.0025285305,"longitude":-3.5323240284}}
groups
array[object (Group) {15}] 
optional
The groups the post is published on.
country
object 
optional
Provides information about the country that is associated with a group. May be null.
Example:
{"abbreviation":"US","name":"United States"}
group_id
string 
optional
has_questions
boolean 
optional
When true, anyone requesting membership to this group will be required to answer a new membership questionnaire.
homepage
string 
optional
A URL to the group homepage.
identifier
string 
optional
A unique identifier for the group that is used in URLs.
latitude
number 
optional
longitude
number 
optional
member_count
integer 
optional
The number of members who belong to the group.
membership
object 
optional
Provides information about the current users' active or pending membership to this group (if any). Will be null if there is no active or pending membership to this group.
name
string 
optional
The name of the group (not guaranteed to be unique).
open_archives
boolean 
optional
When true, the group posts are viewable by anyone. When false, the group posts can only be viewed by members of the group.
open_membership
boolean 
optional
When true, the group allows anyone to join. When false, the group moderators review and approve applicants.
region
object 
optional
Provides information about an area within a country that a group is associated with (eg. a state in the US or a province in Canada). May be null.
Example:
{"abbreviation":"CA","name":"California"}
timezone
string 
optional
The timezone that the group is in (eg. America/New_York).
utc_offset
number 
optional
The group offset (in hours) from UTC time. This does not take into account daylight savings time (DST) in places that observe DST so it may be incorrect during DST.
post
object (Post) 
optional
An offer, wanted, admin, taken or received post.
Example:
{"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","footer":null,"group_id":6,"latitude":43.653226,"longitude":-79.383184,"outcome":"satisfied","photos":[{"images":[{"height":120,"url":"https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.90x120.jpg","width":90},{"height":240,"url":"https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.180x240.jpg","width":180},{"height":360,"url":"https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.270x360.jpg","width":270},{"height":500,"url":"https://trashnothing.com/img/2018-02-05/cfsbfm-39051735845_379baab73f.375x500.jpg","width":375}],"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"}],"post_id":3171898,"title":"Ultrasonic diffuser (Downtown Toronto)","type":"offer","user_id":2933}
replied
boolean 
optional
Whether or not the current user has replied to this post. Will be null for api key requests and for the current users' posts.
user_can_reply
boolean 
optional
Whether or not the current user (if any) can reply to this post. Unverified users cannot reply to posts until they verify their account.
viewed
boolean 
optional
Whether or not the current user has previously viewed this post. Will be null for api key requests and for the current users' posts.
🟠403The user doesn't have permission to access the post.
🟠404Post not found.
Modified at 2022-09-11 18:59:48
Previous
Bookmark a post
Next
Flag a post
Built with